I'm not good at memorizing, but as I read Psalm 130, I think I really ought to try to be.
This psalm begins with a plea to be heard. This plea is immediately followed by the acknowledgment that the one doing the prayer doesn't deserve to be heard.
When I am in pain, and the situation is due to my own fault, how can I expect God to help? Why would God want to step in to that situation? The answer in the psalm is that God forgives.
The psalmist remembers what God is done, and that knowledge enables hope that this trouble also will be overcome, that sins will be forgiven.
Outline of Psalm 130
Memory of what God has already done.