A primary function of living is to praise God and give thanks to him. Even being in a ‘pit’ of despair is nothing like actually being in ‘the Pit’ (hell):
“For Sheol cannot thank You;
Death cannot praise You.
Those who go down to the Pit
cannot hope for Your faithfulness.”