I know it’s wrong to force a mentally ill person to compare their suffering to others. When I tell my doctor how horrible my mental health is, what the symptoms are, and they tell me to “think about the casualties of war in Iran”, I feel horrible. I would never ever do this to a person who’s suffering from mental illness. They probably already have enough on their plate as it is, and shoving the problems of the world in their face at that moment doesn’t help anybody. Is that it? I’d appreciate your input on how to verbalize, as pedagogically as possible, why it is wrong, or why it can be wrong.

Glad it helped. I’ll add that a healthcare provider should not be saying that, although I’ve experienced similar things myself, unfortunately.
Kudos to you for doing what you need to do for your mental health. I know it isn’t easy. Don’t let them talk you out of what you need.
EDIT: there was also an interesting quote I saw around here a couple of months ago. If you’re drowning, it doesn’t matter if you’re 10 m or 100 m underwater, you’re still drowning.