The prophet Isaiah says that in the Redemption, we will say “I thank you Hashem for being angry with me…” because at that time we will clearly see all the abundance of good and blessing which came about as a result of our loving Father’s chastisement of us. Why wait to thank Him then? If we know that ultimately all He does is only for our best, then we can even thank Him and bless Him right in the midst of our hardship, with a calm reassurance and a deep sense of gratitude that He cares enough to chastise us in order to bring about our refinement.