When I hear the beginning of this Psalm I think of Jonah chapter 2. When Jonah is in the belly of the whale you hear him cry out: “I called to the Lord out of my distress and he answered me.” The Psalmist states: “Out of the depths I cry out to thee.” It sounds similar to me.
Do you also hear a recognition of the psalmist, especially in vs.3, that no one can be brought before the presence of the Lord righteous. For all have sinned and fallen short of the glory of God. But he recognizes that and states that all people fall short of what you want them to be, Lord. But vs.4 turns everything around and moves the focal point from the sin of the individual to the forgiveness of the Lord. That is where the focal point should always remain. It should remain on God’s unconditional and undeserved forgiveness. We can find redemption, even the final redemption mentioned in vs.8, only in the Lord.