In his later years, David was reflecting on his life, and he wrote Psalm 37, in which we read the following verses:
Psalms 37:23 The steps of a good man are ordered by the LORD: and he delighteth in his way.
24 Though he fall, he shall not be utterly cast down: for the LORD upholdeth him with his hand.
25 I have been young, and now am old; yet have I not seen the righteous forsaken, nor his seed begging bread.
David was young and now is old. Between the two phases, he sinned grievously. He committed adultery with Bathsheba, and, to cover his sin, ordered the death of her husband Uriah (who was his loyal soldier). He then took her into his palace and married her.
God judged him severely for it. His child by Bathsheba died, and God sentenced David to have the sword never depart from his house, and evil raised against him from his own household (2 Samuel 12:10-11).
The prophecy was fulfilled when the first war against David after his sin was initiated by his own son, Absalom, who committed his own crimes against David.
David fled Jerusalem, broken, weighed down with grief, cursed by his enemies (2 Samuel 16:5-15).
After this period of sin and tragedy, one would expect David to have lived a life of despondency and spiritual defeat.
Not so. David wrote his penitential psalms and poured out his grief, regret and repentance before the Lord.
Though humbled before men, he encouraged himself in the Lord.
Psalms 3:1 <<A Psalm of David, when he fled from Absalom his son.>> LORD, how are they increased that trouble me! many are they that rise up against me.
2 Many there be which say of my soul, There is no help for him in God. Selah.
3 But thou, O LORD, art a shield for me; my glory, and the lifter up of mine head.
4 I cried unto the LORD with my voice, and he heard me out of his holy hill. Selah.
5 I laid me down and slept; I awaked; for the LORD sustained me.
6 I will not be afraid of ten thousands of people, that have set themselves against me round about.
7 Arise, O LORD; save me, O my God: for thou hast smitten all mine enemies upon the cheek bone; thou hast broken the teeth of the ungodly.
8 Salvation belongeth unto the LORD: thy blessing is upon thy people. Selah.
And later in old age he wrote Psalm 37.
"The LORD upholdeth him with his hand ... I have not seen the righteous forsaken ..." (verses 24 and 25).
Even in David's sin, the LORD did not let him go!
And neither does He let us go, if we have trusted in Him. He will never leave us nor foresake us. (Hebrews 13:5)
To us He promises the sure mercies of David (Acts 13:34). The apostle applied this verse to Jesus whom God raised from the dead never more to see corruption, but we are in Christ, and the sure mercies of David are ours also to claim.
David's ancestor was Naomi, to whom the women said, " Blessed be the LORD, which hath not left thee this day without a kinsman, that his name may be famous in Israel. And he shall be unto thee a restorer of thy life, and a nourisher of thine old age:" (Ruth 4:14-15).
David experienced this in his own life, and so will we if we only continue to trust in Messiah, the Son of David.
David was forgiven much, and so he loved God the more.
It will be so with us, if we will only receive the Lord's forgiveness, encourage ourselves in the Lord, and walk on with Him in trust and obedience and love.