I will sing of mercy and judgment - David might say, Adverse and prosperous providences have been of the utmost use to my soul; therefore, I will thank God for both. Or, as he was probably now called to the government of all the tribes, he might make a resolution that he would show חסד chesed, incessant benevolence, to the upright; and משפט mishpat, the execution of judgment, to the wicked; and would make the conduct of God the model of his own.
I will sing of mercy and judgment - That is, In the psalm which he was about to compose, he would make these the burden of his song; he would, in fact, by stating his views as to the regulation of his own conduct, commend these virtues - mercy and justice - to mankind, and celebrate their value. He who himself “adopts” the principles of mercy, kindness, truth, and justice, as his own guide, commends these virtues to mankind in the best way possible. No language can do it effectually, unless a man practices these virtues himself.
Unto thee, O Lord, will I sing - As commending and approving these things; as having put it into my heart to practice them; as displaying them in thine own higher administration: for a father of a family, or a magistrate, is but the representative of God.