Blessed are those who mourn, for they shall be comforted.
— Matthew 5:4

Saturday night live has a regular skit called Debbie Downer. Debbie Downer is the kind of person that ruins a good time because she brings a negative perspective to everything. If you are excited about eating a delicious steak, she will tell you about mad cow disease. If you are excited about going on a roller coaster, she will warn you that people can die from them. She walks around with a perpetual sad look on her face as though she has been mourning all day long. This is definitely not what Jesus means when he says “blessed are those who mourn.”

He is not saying that Christians are sad people. He is not saying that we should walk around making other people sad by being negative. He is not saying that Christians are crybabies or complainers. Instead, mourning has a specific context here. It is the previous beatitude in verse 3 “the poor in spirit.” The one who mourns, mourns over his spiritual condition. He realizes that he does not have a perfect righteousness before God. He realizes that he fails to keep God’s law. He realizes that God requires perfection. This fact grieves his heart. He doesn’t go around being a Debbie Downer, but he mourns over his sin.
Jesus pronounces a blessing on the one that mourns over his spiritual condition. The result of the blessing is, “For they shall be comforted.” In this beatitude, Jesus is alluding to Isaiah 61:1-3.

The Spirit of the Lord GOD is upon me, because the LORD has anointed me to bring good news to the poor; he has sent me to bind up the brokenhearted, to proclaim liberty to the captives, and the opening of the prison to those who are bound; to proclaim the year of the LORD’s favor, and the day of vengeance of our God; to comfort all who mourn; to grant to those who mourn in Zion—to give them a beautiful headdress instead of ashes, the oil of gladness instead of mourning, the garment of praise instead of a faint spirit; that they may be called oaks of righteousness, the planting of the LORD, that he may be glorified.
— Isaiah 61:1-3

In Luke 4:18-21, Jesus applies this passage to himself and says that he is fulfilling it in his ministry. In other words, the work of Christ is what comforts the mourning of the spiritually poor. His life, death and resurrection are the only source of comfort for sinners.
When we mourn over our sins, we don’t necessarily cry. We take them seriously. We don’t try to rationalize them away. We don’t try to minimize their severity. Instead we take responsibility for them and confess them to God. No excuses are made.
Jesus is quick to comfort those that mourn over their sin. This is the result mentioned in this beatitude. “For they shall be comforted.” Only the Gospel can bring this comfort. It proclaims the forgiveness of sins because Christ died for us. It proclaims the gift of a perfect righteousness because Christ earned it for us.