17 I will give thanks to the Lord because of his righteousness; I will sing the praises of the name of the Lord Most High.
David here in the Psalms is reflecting on his heart attitude towards God. David is not saying that he should, or he'll think about it, rather David, showing God reverance, is saying "I will give thanks to the Lord..." We need to remember that no matter what we go through, need must give thanks to Him who brought us into this world. Lets look at more of the passage, the sentance goes on to say "I will give thanks to the Lord because of His righteousness;" David is giving empty thanks, there is reason behind it. God is the only one that can say something to us, and deliver on it 100%. God is always faithful to His word and therefore, like David, we need to always be thanking Him. Next time you're worshiping at church or whatever, think about the words that are in the song, and pray to God that He places on your heart a desire like Davids to always be thanking and recognizing what we have been rescued from.
Psalm 7:17 Additional Content:
During a time of great evil and injustice, David was grateful that God is righteous. When we wonder if anyone is honest or fair, we can be assured that God will continue to bring justice and fairness when we involve him in our activities. If you ever feel that you are being treated unfairly, ask the one who is always fair and just to be with you. Then thank him for his presence.