“Surely goodness and mercy shall follow me all the days of my life,
and I will dwell in the house of the Lord forever.”
To begin, as the first verse indicates, David was born an Israelite. So, he learned as a child that God had a special and close relationship with Israel, and it had begun long before David was born. David had nothing to do with it. This meant that just because David was born in Israel, the Lord was his Shepherd. He even sang about it: “Give ear, O Shepherd of Israel, you who leads Joseph like a flock! You, who dwells between the cherubim, shine forth!”
Secondly, David had experienced sin, but then also experienced God’s redemption from it. He knew what it was like to feel condemnation and shame and what it was like to receive mercy from God. In fact, David at one point committed two sins for which there was no forgiveness under the Law, adultery and murder, and yet God had gone beyond the Law and forgiven the miserable king. When David said, “He restores my soul,” he was testifying to the great, unexpected, and unprecedented mercy he had received. David knew he had nothing to do with his being forgiven. God had simply reached down and rescued him from the shadow of certain death. If there had been a sacrifice David could have made that would have atoned for his sins, he would have gladly made it, but for the sins of adultery and murder, there were no sacrifices to make.
When David said, “You anoint my head with oil,” he was remembering the day he was out in the field keeping his father’s sheep when a thoroughly winded servant brought a message from his father in Bethlehem. It would have been something like this: “Your father says come to the feast immediately. The prophet Samuel has come to town, and he says we cannot eat until you come.” David went to the feast, and Samuel poured the anointing oil of God on his head, signifying that God had chosen him to be Israel’s next king. David had nothing to do with it. God had simply chosen him to be Israel’s next king. Nobody had advised or even asked God to anoint David.
When David said, “You prepare a table before me in the presence of my enemies,” he was remembering the courage and faith God had fed him when David faced the giant Philistine, and he was remembering the untouchable, sacred bread in the tabernacle which God allowed David and his friends to eat when he was running for his life from mad king Saul.
When David said that God “makes me to lie down in green pastures,” and, “leads me beside the still waters,” he was remembering the great peace that always came to him when he took time to draw near to God.
David was able to write, “Goodness and mercy shall follow me all the days of my life” because God had convinced David that He loved him. God had convinced David that He was going to deliver him regardless of the circumstances in which David found himself. He had convinced David that He was David’s friend.
In saying, “I will dwell in the house of the Lord forever,” David was not claiming, as many do now, “I’m saved and you can’t make me doubt it.” Instead, he was simply confessing that God’s love had won his heart and that, based on the loving kindness God had repeatedly shown him throughout his life, the only logical conclusion was that God wanted him to live forever and was determined to see to it that David did.