How patient are we? What are we like when we have to wait? In this Psalm we see an example of king David having exercised patience in difficulty (Psalm 40:1-3), then seeks to trust the Lord and His deliverance once again (Psalm 40:11,13).
David has had a dreadful experience in the “pit,” a place of darkness and despair, In the first half of the Psalm (verses 1-10) we discover how the Lord got him out of the pit on one occasion. In the second half of the Psalm (verses 11-17) it is evident that David is now in another “pit” and cries to the Lord for deliverance once again.
Considering the experience David recalls in Psalm 40:1-3 we can see three features of David’s experience:
 King David experiences an inner struggle.
We are not sure what the particular difficulty is, but it is clearly an internal struggle. He cries to the Lord (40:1). Elsewhere, in Psalm 6:6 we learn of David crying to such an extent that he drenched his bed with tears. This situation (whatever it may have been) was clearly very bad as shown by the imagery of the pit and the miry clay.
What did David do? We might imagine a small child with their father in a swimming pool but who then gets out of their depth and is suddenly terrified crying out to dad for help. This cry of David is directed to the Lord, for David knew that the Lord was ready to hear his cries, just as the child knows his father is nearby in the pool. We must trust to nothing else save the Lord. Other helps such as doctors, nurses, medics and so on are useful but they are not the ones we direct our cries to for help. The Lord may use such to help as He wills but the cry must go to the Lord.
It is better to trust in the Lord than to put confidence in man. (Psalm 118:8)
What are the things we might do when a crisis occurs? We may not wait upon the Lord. We may take action into our own hands, or seek help using our own ingenuity and strength. Sometimes we fret, sometimes we withdraw, sometimes we run, sometimes we control others, sometimes we defend ourselves or justify our actions, but all of this is idolatry for we are not trusting in the Lord but in self or in another (medical profession) or some scheme or viewpoint (wrong-headed thinking).
What else did David do? He waited patiently (40:1). The Hebrew is literally “I waited waitingly.” He did not just wait for a time like Saul for Samuel to come and perform the sacrifice (1Samuel 13:8-11). He waited with a settled mind and heart waiting for the Lord to act. He was not going to stop waiting. He was going to be consistent in his waiting for the Lord. Remember that God knows what He is doing. His timing is always perfect. It was in due time that Christ came and died for us. All time is in God’s hands. He who sent His Son to die for us loves us, and so His seeming delay is for our good. He expects us to wait for Him. He does not give us all that we ask or desire immediately. His purpose in delaying is for our sanctification and holiness. Waiting for the Lord and waiting upon the Lord is an essential part of the Christian life. We are to wait upon the Lord in humility, in hope, and in expectation.
 King David was rescued from the pit.
What is intended by this image of the pit and the miry or boggy clay? Perhaps we should think of a cistern or dungeon like the one Jeremiah was thrown into and sank into the mire nearly to his death (Jeremiah 38:6)? Or maybe a deep well, dark, dank, putrid, from which there is no escape? Perhaps the intention was to suggest that he was at death’s door? The issue king David faced could have been a national threat from an enemy, or it may have been an illness. It could have been any number of things. And so we are justified in applying this in a general sense to cover all those situations where we find ourselves in a pit of despair, a boggy mess from which we can see no escape. Each of us encounter such pits of despair from time to time and each of our experiences differ, but all may be linked with this experience king David was going through. Only the Lord knows the depths of our miry pit so we must be careful with respect to the experiences others are going through. What they are struggling with maybe something you take in your stride. But to them it is a boggy mess and they will need our love and watchful prayers so that they can look to the Lord. Remember that God really does care for you. David also wrote these words when he was captured by the Philistines:
You number my wanderings; put my tears into Your bottle; are they not in Your book? (Psalm 56:8).
We do not need to limit the application to certain difficulties or struggles, for God collects every tear!
We learn here that king David was lifted out of this pit of despair and he was placed in a firm and secure place so that his feet were on the rock (40:2). God will lift us out of our pit and boggy situation. So we can approach God with expectancy. King David recalled the occasion that God drew him out of the pit and he reasons that the Lord will do so again. God has not changed. His power is not weakened. He still loves and cares for His people.
In the bog and mire all we can see is the problem, the issue, and (what seems like) the unanswered prayers. But the Lord will (in His perfect time) life us up out of the pit of despair. Now from other Scriptures we know that this happens in two ways.
[a] He may indeed take us out of the situation, or He may remove the difficulty and problem completely. Sometimes the Lord heals miraculously.
[b] He might deliver us within the situation, giving us more grace and strength. The testimony of a believer in difficulty is a great witness.
Whatever way the Lord chooses to deliver and save from the pit we know that it is accompanied with an incredible peace which surpasses all understanding (Philippians 4:7).
If you have not yet cried out to the Lord to save you from the pit of despair then cry to Him now for now is the day of salvation. The Lord is still heeding those who cry out to be rescued so why will you not come?
 King David sings!
King David knew the Lord’s deliverance from a desperate situation but how does he respond to his rescue? Well the only valid response is to sing! People sing naturally when they have received something wonderful or marvellous. Some sing when their football team does well! Others sing when they fall in love. But king David sings because of his deliverance by the Lord. This is why we sing!
Think how important singing is. We can express truths with a depth of emotion that speaking in conversation does not convey. Think of the many examples of godly music written over the years. Whilst our hearts are engaged in singing in praise to the Lord, songs are sung for others to hear as well. King David speaks later of not hiding the Lord’s goodness in his heart (Psalm 40:9,10), and singing the truths is one important way we declare the gospel.
But apart from the singing of hymns and songs in the great congregation, king David’s expression is a personal one. He sung out in grateful thanks to the Lord. We too can sing out a personal song of praise to God. Let me encourage you to ‘sing your song of deliverance’ (Psalm 32:7). It is very important that we share our testimonies! The Lord has done great things and so king David sings out in praise. May we sing of all that the Lord has done for us in all things!