"Blessed are those who mourn, for they will be comforted" (Matthew 5:4)
The mourning referenced here refers to mourning over sin...it's a godly type sorrow that produces repentance leading to salvation without regrets.
2 Corinthians 7:10 - "For godly sorrow produces repentance leading to salvation, not to be regretted, but the sorrow of the world produces death".
Godly sorrow refers to sorrow that is according to the will of God and produced by the Holy Spirit. True repentance cannot happen apart from such a genuine sorrow over one's sin. In the verse, 2 Cor. 7:10, the apostle Paul mentions "leading" saying that repentance belongs to the realm or sphere of salvation. Repentance is at the deepest part of the heart and proves one's salvation: Unbelievers repent of their sin initially when they are saved, and then as believers repent of their sins continually to keep the joy and blessing of their relationship to God.
Isaiah 40:1-2 mentions the comfort is the comfort of forgiveness and salvation.
Sorrow of the world produces death meaning human sorrow is unsanctified remorse and has no redemptive capability. All this sorrow is simply wounded pride of getting caught in one's sin and having one's lusts go unfulfilled. This sorrow leads only to guilt, shame, despair, depression, self-pity and hopelessness. "People can die from such sorrow" Matthew 27:3.
Continually, we need to practice godly sorrow. As I look inward at my sin I realize the need to maintain that constant, unbroken connection with the Father. When I "repent" is it Godly sorrow or is it worldly sorrow? Am I only asking for forgiveness because I got caught or am I truly burdened and broken over my sin. Today, be broken over sin and allow the Spirit to move your heart and refine it. When He tugs on you to remove a sin then take action to remove it from your life. Doing this will result in each day us being like Christ.