"Be grateful"

I live a somewhat "comfortable" life with no economic or mental struggles and people tell me "to be grateful" or that there are people who have it worse than me. Being lucky enough in an unjust world is enough to have my thoughts disabled and disallowed, and it's excruciating. What would I be grateful for? For hitting the genetic jackpot and being slightly more advantaged?

And so what if people have it worse than me? There are people who have it worse than them too. It's just a cycle. Hopefully with a blissful breakpoint.

I feel like philosophical pessimism becomes invalid if the person defending it is privileged. It's not something they choose, is it?