Almost all interpreters agree in supposing, that in this psalm David in general expresses his wonder and amazement at the goodness of God, because, in the exercise of his favor and mercy, he bears with the wicked, who, notwithstanding, basely contemn him. The opinion which I have formed is somewhat different. I think that the holy prophet, being grievously troubled and harassed by wicked and ungodly men, first complains of their depravity, and then seeks refuge in the infinite goodness of God, which extends not only to all men in general, but in a particular and special manner to his own children; and this he does in order to console, and, so to speak, take his breath, in the assurance that he shall at length be delivered since God is favorable to him. This is evident from the conclusion of the psalm, in which he arms and fortifies himself against all the assaults of the ungodly, by reflecting that he is safe under the protection of God.
To the chief musician. A Psalm of David, the servant of Jehovah.
Why the appellation, the servant of God, is ascribed to David only in this place and in the eighteenth psalm, rather than elsewhere, cannot positively be ascertained, unless that having been victorious in a conflict, of all others the most difficult, he proved himself to be a valiant warrior and an invincible champion in the sight of God. We know how rare and singular a virtue it is, when ungodliness is prevailing without restraint, and when the shade of its obscurity darkens our spiritual vision, to look up, notwithstanding, by the eye of faith, to the providence of God, which, by disposing our minds to patience, may keep us constantly in the fear of God.