The psalmist faced death (also in Psalm 30:1–3), either literally or figuratively. When he turned to the Lord, the Lord rescued him and changed his mourning into joyful dancing. Only God's favor can permanently and powerfully overcome human failure and deep despair.