But it's really not easy.
If something is genuinely overwhelming, infuriating, and horrible, it's extremely painful to thank Hashem for it. Even if you know everything Hashem does is for your own good, some things are just over the top.
But I force myself to do so anyway (most of the time...) and it really does sweeten and lighten the harsh things in life.
Rav Arush says that even if your "thank you" is dry, it's still effective.
And I can personally attest to the truth of this.
Even if you're full of resentment, just the act of lip-service that it is somehow for your best impacts you in profound ways you may not immediately sense.
The mere act of expressing gratitude toward God in the most exasperating times kindles a high-octane spark that can ignite tremendous blessing.
This is true even if you have to grit your teeth to do it and every fiber of your being is screaming, "NO I HATE THIS!!!!!!!"
In the interest of full disclosure, here is a self-portrait of how I sometimes express my gratitude to Hashem in overwhelmingly trying times:
I'm only human and so are you.
So don't despair.
Just take that step and you'll eventually reap blessing!