Look back at what he says, and underscore it in your hearts, your minds, and your Bibles.
First of all, David is rejoicing in the Lord. You, You, You: the Lord fills David’s mind, David’s words, David’s future plans. That is what rejoicing is about: the Lord. Rejoicing is not about good times, it finds it source in the Lord. If the Lord fills our minds and lives, we are rejoicing, there is no way around it. So David is rejoicing.
Secondly, David is talking to the Lord. All the way through this Psalm we see David talking to the Lord. In fact almost all of David’s 71 Psalms look either partially or entirely like prayers. They reflect David’s heart. David loved to talk to the Lord. What do we call “talking to the Lord”? We call it prayer, right? So David is praying.
Finally, David is clearly thankful. He is talking about all the good things his God has done for him. David says everything since my birth has Your Handiwork stamped upon it. David was thankful for God’s wondrous works, for God’s salvation, for God’s righteousness, for God’s power. In other words David saw God everywhere in life, and in everything that happened. So David is thankful.