And he hath put a new song in my mouth (see the comment on Psalms 33:3). Even praise unto our God. Mercy and praise are cause and effect. The deliverance recorded in Psalms 40:2 produces the praise of Psalms 40:3-5.
The phrase, "our God," shows us how David instinctively identifies himself with his people. A mercy shown to him is one shown to them. Many shall see it, and fear (comp. Deuteronomy 13:11; Deuteronomy 17:13; Deuteronomy 19:20; Deuteronomy 21:21, where the phrase, "all Israel shall hear and fear," is used of the effect produced by the capital punishment of a high-handed transgressor of the Law).
There may be an allusion here to Absalom's end, which was probably followed by a certain number of executions. And shall trust in the Lord; i.e. shall have their faith in God strengthened.