Psalm 40
Hebrews 10:5–9 quotes 40:6–8 and applies the passage to Christ, which makes this a messianic psalm. Some see the birth of Christ in verse 7, His sinless life in verse 8, and His sacrificial death in verse 6. However, it was first of all a psalm about David and his needs and how the Lord met them, but the historical setting is obscure. David may have written it during his difficult exile years or perhaps during the early years of his reign. It's unusual for a psalm to have a prayer for mercy following praise and dedication. However, if verses 1–5 picture his deliverance during the dangerous exile years, and verses 6–10 describe his dedication as the new king, then verses 11–17 could be a record of his prayer for personal forgiveness (v. 12; see 38:3–5; 39:8–9) and victory over his enemies following his coronation. It does seem that verse 16 is a royal prayer for God's blessing on the nation. You find verses 13–17 repeated in modified form in Psalm 70. From whatever experiences led to the writing of this psalm, David learned some valuable lessons and gave us three important instructions to follow in the difficult times of life.
In verse 6, sacrifice means any animal whose blood was offered at the altar, followed by a communal meal. Offering refers to the meal offering that could accompany the sacrifices, and the burnt offering symbolized total dedication to the Lord. The sin offering was given to cover specific offenses and bring reconciliation between the offender and God. All of these were fulfilled in Jesus Christ whose sacrifice on the cross satisfied the justice of God once and for all, for time and eternity (Lev. 1—7; Heb. 10:1–17). The "open ears" refer to his readiness to hear and obey God's will (1 Sam. 9:15; 20:2; Isa. 48:8; 50:4–5; Matt. 3:9, 43; Acts 7:51, 57). This is not a reference to the servant in Exodus 21:1–6. The passage is paraphrased in Hebrews 10:5–10 as "a body you have prepared for me," i.e., the body in which Messiah served the Father here on earth. An open ear means a yielded will and a surrendered body. When the heart delights in God's law, the will has no problem obeying (119:11; Deut. 6:6; 11:18; Prov. 3:3; 7:3; Jer. 31:33). "Lo, I come" means "Here I am, ready to obey" (see 1 Sam. 3:4, 6, 8; Isa. 6:8). The scroll may be a reference to Deuteronomy 17:14–20, and see 2 Kings 11:12 and 22:13. The Old Testament predicts the coming of the Messiah (Luke 24:27).
Praise God for All He Has Done (vv. 1–5) No matter what our trouble or trial, it's always good to look back and recall the goodness of the Lord. David remembered how long he had waited before the Lord delivered him from his enemies and from Saul, but the day came when God inclined His ear (31:3), heard his cries, and lifted him up from the pit. If David learned anything from his exile years, it was that ultimate success depends on faith in the Lord and patience during His providential working (5:3; 33:20; 37:34; 38:15; Heb. 6:12). We are not to take the description of the pit literally (slime, mud, mire), but figuratively, as a picture of those difficult years David endured. "The pit" is also a term for sheol, the realm of the dead, and David's life was certainly in danger. A quaint country
David was enthusiastic about telling others what the Lord had done for him, and he is a good example for us to follow (22:25; 26:12; 35:18; 111:1; 149:1). Among the worshippers at the sanctuary, the king gave
