Jesus is not addressing those who mourn the loss of a loved one in Matthew 5:4. Bereavement is not the point, rather it is mourning because of sin - our sin and the sins of others. This beatitude follows from the previous one, which speaks of our impoverished state before God, our spiritual bankruptcy and need of divine mercy. The response to that condition is to mourn.
Jesus could have spoken of the need to be sorry or contrite for our sins, but his point is made stronger by linking our sin with mourning. Mourning speaks of a passionate lament, being broken-hearted, overwhelmed with sorrow, grief-stricken. When Jacob was told that his son Joseph was dead, he "tore his clothes, put on sackcloth and mourned for his son many days. All his sons and daughters came to comfort him, but he refused to be comforted. 'No,' he said, 'in mourning will I go down to the grave to my son.' So his father wept for him." (Genesis 37:34-35) Similarly, when King David was told that his son had been killed, the depth of mourning can be felt in his words: "O my son Absalom! My son, my son Absalom! If only I had died instead of you - O Absalom, my son, my son!"(2 Samuel 18:33) This is the depth of mourning Jesus is talking about.
Jesus counts those who mourn for their sins as blessed. They are privileged because they have come to a true knowledge of God and their spiritual condition. Mourning is not about being morbid or depressive. Mourning is seeing sin for what it is – an evil, rebellious act against God, who is holy and righteous. David said of his sin: "Against you, you only, have I sinned and done what is evil in your sight." (Psalm 51:4) He correctly identified his sin as an evil act committed against God. And he mourned because of his sin.
What God desires is not an outward show of supposed repentance. When Israel gave that to God, he responded saying, "Rend your heart and not your garments." (Joel 2:13) David knew what God was after: "The sacrifices of God are a broken spirit; a broken and a contrite heart, O God, you will not despise." (Psalm 51:17) Many people have been sorry for what they have done. Their sin may have ruined their business, destroyed their marriage or landed them in jail and now they are filled with sorrow and regret. But unless there is recognition of guilt before God, they have not mourned in the way Jesus is talking about here. The Bible says: "Godly sorrow brings repentance that leads to salvation and leaves no regrets, but worldly sorrow brings death." (2 Corinthians 7:10) We mourn for our sins when we acknowledge that God is the offended party. Not only have we offended him, but also through our sins we have suffered some degree of personal loss. It could be loss of innocence, loss of self-respect, loss of faithfulness before God.
They Shall Be Comforted
From time to time we must also remember that our sins required the atoning death of the Son of God to forgive us. Mourning keeps before our eyes the right perspective on who God is and what sin is. When we confess our sins, even the ones for which we have been forgiven, God comforts us with the blessed assurance of being fully pardoned. Through his word and the ministry of the Holy Spirit, he comforts us with his repeated assurance of forgiveness. But he also comforts us through the ministry of other believers. When David committed adultery and, in his attempt to conceal his sin, arranged for Uriah to be murdered, God sent the prophet Nathan with a dual ministry: he would confront David about his sin and then comfort him with the assurance of pardon. "Then David said to Nathan, 'I have sinned against the Lord.' Nathan replied, 'The Lord has taken away your sin.'" (2 Samuel 12:13) Those who mourn over their sins are not only forgiven, they are also comforted.