What the psalm may lack, though, is a very strong assurance of God’s forgiveness, which, after all, hard to see if you’re troubled. It's a prayer from the perspective of the sinner, but there are scriptural assurances that should be read along with the prayer, for instance Romans 7:24-25, where the assurances of Christ's salvation of lost, broken people is affirmed. If you’re in (what I call) a “Psalm 51 state of mind,” you need to simultaneously keep firmly in mind that we have forgiveness and restoration already through Christ. You need to remember that just because you feel very badly, that God doesn't feel the same way about you as you do about yourself.
In fact, recently I read a book that made an interesting point from a different angle. The author noted how afraid he had once felt concerning Matthew 25:46 and its promise of eternal punishment. What a terrible fate lay in store for people who denied Jesus unwittingly! But the author realized … by the criteria of Matthew 25:46, Jesus’ disciples were all heading to Hell! Soon after this passage, they all denied and forsook him, not by failing to help the needy, but in the literal sense: they abandoned him in his most desperate time. But what happens? Jesus appears to them, loves them, and promises his eternal companionship (Matt. 28:20).(1) Passages like this are also great assurances that God never ever gives up on us, no matter how badly we've messed up.
1. Matthew Linn, Sheila Fabnicant Linn, and Dennis Linn, Understanding Difficult Scriptures in a Healing Way (Mahwah, NJ: Paulist Press, 2001), chapter 2.