The poles of thanksgiving and lament are so distinct in this psalm that some divide it into two separate psalms.
Two situations constitute the framework for the psalmist’s publicized expressions of worship in Psalm 40.
I. Precedent from a Past Situation (40:1-10).
A. The Merciful Rescue by God (40:1-3);
B. The Multiple Resources in God (40:4-5);
C. The Motivational Responses to God (40:6-10).
II. Prayers for a Present Situation (40:11-17).
Psalm 40:1 I waited patiently for the LORD; and He inclined unto me, and heard my cry.
Psalm 40:2 He brought me up also out of a horrible pit, out of the miry clay, and set my feet upon a rock, [and] established my goings.
First, resurrection as the act of God, He brought me up, etc.
Secondly, the justification of the name and title of the Sufferer, and set my feet upon a rock. Jesus is set up, as alive from the dead, upon the basis of accomplished truth.
Thirdly, there is his ascension, He establisheth my goings. The Son of God having trodden, in gracious and self renouncing obedience the passage to the grave, now enters finally as Man the path of life.
Psalm 40:7 Then said I, Lo, I come: in the volume of the book [it is] written of me, Psalm 40:8 I delight to do thy will, O my God: yea, Thy law [is] within my heart.
If Christ liveth in us, then the Law of God is in our heart.
It is a pleasure, not a chore, to do the will of the Lord.
What a privilege to find our names written in the book of life, and what an honor, since the name of Jesus heads the page!Psalm 40:9 I have preached righteousness in the great congregation: lo, I have not refrained my lips, O LORD, Thou knowest.
Psalm 40:10 I have not hid Thy righteousness within my heart; I have declared Thy faithfulness and Thy salvation: I have not concealed Thy lovingkindness and Thy truth from the great congregation.
Psalm 40:11 Withhold not Thou Thy tender mercies from me, O LORD: let Thy lovingkindness and Thy truth continually preserve me.
Psalm 40:12 For innumerable evils have compassed me about: mine iniquities have taken hold upon me, so that I am not able to look up; they are more than the hairs of mine head: therefore my heart faileth me.
Psalm 40:17 But I am poor and needy; yet the Lord thinketh upon me: Thou art my help and my deliverer; make no tarrying, O my God."
BooksOfTheBible/Charles Spurgeon

