In Hebrew, the word translated “song” means words for singing, whereas “psalm” means specifically that instruments should be played with it.
David calls for praise from all the earth, meaning both the planet itself and all the people living on it. Get the whole orchestra involved in support of the choir and glorify His divine title as Lord of all. Because of His awe-inspiring actions even His enemies will fall at His feet, even if only in pretense to avoid His wrath. But every living thing will eventually worship Him, one way or another; they have no choice.
Why? Because the entire universe is just a toy in His hands. David mentions the demonstrations of that power in favor of Israel at her birth in the Exodus. Whenever she is faithful to Him, Israel faces no meaningful resistance from those who do not serve her Lord. You can either humble yourself before Him or be humbled by His power.
When people praise Him in joyful worship, He sees to it that their lives are firmly established in this world as His witnesses. That doesn’t mean we face no trials, but that we come through them like refined precious metals. He notes how Israel had passed through fiery trials, walked on by other nations at times, but God never abandoned His witness. Israel always emerged to abundant provisions.
As for himself personally, David would not fail to enter the place of worship with whatever he had vowed to offer. It didn’t matter how frivolous or extravagant he might have been in times of trouble, it was worth that and more simply be God’s chosen. David stands ready to regale them with tales of God’s generous blessings in his life. It’s not as if David pretends he was always just and innocent; surely he has faced the damage sin caused in his life. However, upon repentance God always restored David to His favor.
God is merciful to those who call on Him.