Psalms - Chapter 138
Really Outdoing Himself
David says that he will thank G-d wholeheartedly and sing to Him in the presence of the scholars and judges of the land, who appreciate His ways. David says that he will bow down in prayer facing the direction of the Temple, thanking G-d for His kindness and truth. (The Radak says that G-d was kind when He promised David the throne and true when He fulfilled His word.) G-d really "outdoes Himself," Rashi says when it comes to forgiving sin.
When David cried out to G-d, he was answered and encouraged. The kings of the world saw how David was answered and had to acknowledge G-d. When they see David's triumph, they will sing to G-d. Even though He is on high, He still takes special note of the humble and punishes their oppressors.
Even though he is surrounded by troubles, David knows that G-d reinvigorates him and gives him the ability to confront his foes. David prays that G-d will "finish what He started" by extending His kindness to the future exiles.