David seems to have been in a great strait when he penned this psalm, and, upon some account or other, very uneasy; for it is with some difficulty that he conquers his passion, and composes his spirit himself to take that good counsel which he had given to others (Ps. 37:1-40) to rest in the Lord, and wait patiently for him, without fretting; for it is easier to give the good advice than to give the good example of quietness under affliction. What was the particular trouble which gave occasion for the conflict David was now in does not appear. Perhaps it was the death of some dear friend or relation that was the trial of his patience, and that suggested to him these meditations of morality; and at the same time, it should seem too, he himself was weak and ill, and under some prevailing distemper. His enemies likewise were seeking advantages against him, and watched for his halting, that they might have something to reproach him for. Thus aggrieved, I. He relates the struggle that was in his breast between grace and corruption, between passion and patience, Ps. 39:1-3. II. He meditates upon the doctrine of man’s frailty and mortality, and prays to God to instruct him in it, Ps. 39:4-6. III. He applies to God for the pardon of his sons, the removal of his afflictions, and the lengthening out of his life till he was ready for death, Ps. 39:7-13. This is a funeral psalm, and very proper for the occasion; in singing it we should get our hearts duly affected with the brevity, uncertainty, and calamitous state of human life; and those on whose comforts God has, by death, made breaches, will find this psalm of great use to them, in order to their obtaining what we ought much to aim at under such an affliction, which is to get it sanctified to us for our spiritual benefit and to get our hearts reconciled to the holy will of God in it.