Habakkuk 2 is all about God’s judgement. In Habakkuk 3, Habakkuk responds, and his response is praise.
To start off, Habakkuk asks God to “In wrath remember mercy” (3:1). This is a proper response: we shouldn’t desire that anyone fall under God’s wrath. We should desire that people come under his mercy. But then he goes on to speak of God’s magnificent, incredible power as displayed through his judgement and wrath: “Before Him goes pestilence, and plague comes after Him.” (3:5) Verse 2-12 talk talk about God’s terrible judgement and awesome power, before switching modes a bit in verse 13:
“You went forth for the salvation of Your people,
For the salvation of Your anointed.
You struck the head of the house of the evil
To lay him open from thigh to neck.”
The rest of the chapter, like this verse, talks about both God’s judgement against some and His salvation of others. His judgement, in fact, is the instrument of His salvation, as seen clearly in verse 13. This comes back to something I’ve talked about before: that love requires justice. The main thrust of that post is that God judges sin because sin causes harm to people He loves: either humans created in His image, or the other persons of the Godhead. In my mind, Habakkuk 3:13 provides strong support for that idea.
In the end, Habakkuk concludes that, even when God’s judgement is affecting him severely, he will still praise God, for God will save him in the end and gives him strength in the present. Hard circumstances, even judgement, are no excuse not to glorify God. In fact, they are all the more reason to.