Blessed are those who mourn, For they shall be comforted.
Matthew 5:4
The mourning referenced here is more specific than the mourning over temporal losses in this life that are common to all people. The second beatitude is closely associated with the first who are aware of their spiritual bankruptcy.
The more one understands his or her spiritual bankruptcy, and how awful the results of the bankruptcy truly are, the more likely that person will mourn over it. This mourning arises from the heart that grieves at the thought of one’s impending appointment with the wrath of God. Those who get this, and mourn over it, are elect of God because those who are not, don’t much care! But when the elect mourn regarding their lostness, they will cry out to God for mercy, which is found only in Jesus Christ (specifically His death and resurrection to save His people). These will be saved, but is their mourning ended?
Their mourning changes but is not yet altogether ended. As believers in Christ, who have received new affections to follow Jesus, they will mourn over their continued struggles against sin that are common to every believer. This is what Paul was mourning about in the later portion of Romans 7. As we grow in sanctification, we likely sin less, but continue to mourn over our sin because as we are sanctified, we become more aware of lesser sins about which we were once oblivious. This mourning over sin in the life of believers is punctuated with sweet relief as we confess our sins and are forgiven and cleansed again and again (1 John 1:9).
But praise the Lord, there is a time coming for those who mourned over their sins that brought them to saving faith in Christ, and who mourned over their sins as believers (though forgiven), when mourning will be altogether ended! This end of all mourning will be when those who trust in Christ are glorified in Heaven with Christ, where there is no sin over which to grieve. This confident assurance will be our comfort in Christ!