Philippians 4:4 says, "Rejoice in the Lord always. I will say it again: Rejoice!" and then, "Do not be anxious about anything, but in everything, by prayer and petition, with thanksgiving, present your requests to God." (vs. 6)
In everything, joys and deep sorrows, we are to praise the Lord. When we want to curl up and cry and retreat and maybe even give up, turn to praise and trust the Living God to come and meet you in the midst of your deepest sorrow, offered up as a sacrifice of praise.
"Though the fig tree does not bud and there are no grapes on the vines, through the olive crop fails and the fields produce no food, through there are not sheep in the pen and no cattle in the stalls, yet I will rejoice in the Lord. I will be joyful in god my Savior" Habakkuk 3:17-18.
When we feel fruitless, bare, without much to be thankful for, we can still rejoice in the Lord. And when we exercise such faith, we realize that the Sovereign Lord will not only strengthen us to endure, but He makes our feet like the feet of a deer; he enables us to go on the heights (vs. 19). We can walk forward with sure footed confidence because we learn more of who God is in praise.
The bible is full of praises to the Lord. When we read through the Psalms and praise the Lord, regardless of what circumstances we are trudging through, God's Word will nourish our hearts and souls so that we can say with the Psalmist,
"I will extol the Lord at all times;
his praise will always be on my lips.
My soul will boast in the Lord;
let the afflicted hear and rejoice.
Glorify the Lord with me;
let us exalt his name together."