Habakkuk 3:18 says, "yet I will rejoice in the Lord! I will be joyful in the God of my salvation!"
Habakkuk is experiencing a lot of different emotions throughout the Bible. He is going through serious turmoil along with the rest of Judah, and is carrying a lot of stress knowing that the people of the promised land are going to be taken into Babylonian captivity.
Something happens to Habakkuk by chapter 3 though. Habakkuk no longer has comfort in this world. He ends up finding contentment purely in God.
Just like Habakkuk, God wants us continuously stripped of finding comfort in the things of this world, so that we would be "content" with Him.
"Not that I was ever in need, for I have learned how to be content with whatever I have. I know how to live on almost nothing or with everything. I have learned the secret of living in every situation, whether it is with a full stomach or empty, with plenty or little. For I can do everything through Christ, who gives me strength." Phil. 4:11-13/NLT