Here is the theology of thanksgiving.
“Make a joyful shout to the Lord, all you lands Serve the Lord with gladness;
Come before His presence with singing.
Know that the Lord, He is God;
It is He who has made us, and not we ourselves;
We are His people and the sheep of His pasture. Enter into His gates with thanksgiving,
And into His courts with praise.
Be thankful to Him, and bless His name.
For the Lord is good;
His mercy is everlasting,
And His truth endures to all generations.” – Psa. 100