2 Samuel 22: 1-23:23
Like you, I too have my days of despair from struggling with sin. Given that, I can tell you that there is no one figure in the Bible (other than the words of our Lord Jesus Christ) that gives me more strength than the story of David does. David's life was full of self brought on troubles/battles.
What about David and his song? Firstly, let us remember that David was special because he was chosen by God; and because, David always turned to God. David acknowledged his sins which were great, including murder) and yet he ran to God every time he sinned and though he repented every time, he still sinned, he still ran to God. The point of looking at David's life, we learn that no matter how great our sin, salvation is still ours if we just turn to the Lord, acknowledge our sin and repent = rethink which means to pause and realize that sin is an aspect of this fallen world; and yet, through 'right believing' ...believing that Jesus Christ is the Lord God and Savior, we 'you' too will be saved. "I am the way and the truth and the life. No one comes to the Father except through me." John 14:6 The first step in repenting 'rethinking' is to run to God, run to the Lord and confess sin and ask to be delivered from it.
To better understand repenting/rethinking in context of forgiveness and salvation, we can compare the situation of Judas to David. Of course, your first reaction is that there is no comparison because of what Judas did... he turned Jesus over to the authorities for money. However, the worst act that Judas did was to hide his sin, to run away from it by not running to the Lord. Judas ran from forgiveness and salvation. David did not.
David's song... "The Lord is my rock, my fortress, and my savior; my God is my rock, in whom I find protection. He is my shield, the power that saves me, and my place of safety. He is my refuge, my savior, the one who saves me from violence. I called on the Lord, who is worthy of praise, and he saved me from my enemies. The waves of death overwhelmed me; floods of destruction swept over me. The grave wrapped its ropes around me; death laid a trap in my path. Bu in my distress I cried out to the Lord; yes, I cried to my God for help. He heard me from his sanctuary; my cry reached his ears....God's way is perfect. All the Lord's promises prove true. He is a shield for all who look to him for protection. For who is God except the Lord? Who but our God is a solid rock? God is my strong fortress, and he makes my way perfect. He makes me as surefooted as a deer enabling me to stand on mountain heights...."
*The One Year Bible for Women (NLT)