Recently I ran into a post on reddit asking for advice on how to deal with a player having an emotional response and getting depressed over a death of an NPC they couldn't save. OP did want to remove them from the group not to ruin everyone else's fun, which a number of people chastised (and is one of the reasons I won't link it here). The whole situation did remind me of an idea we had in our podcasting group though about how to handle similar situations.
Draw boundaries
If you want to have a game where everyone is comfortable in playing, you ought to communicate both what you expect out of the game, as well as discussing boundaries. The latter is often overlooked since a lot of people just go off of what's been acceptable in their circle of friends and so on. A good deal of the time that's fine, but sometimes you do have to be more explicit since RPGs are prone to a lot more bleed than other games.
If you want to establish boundaries more explicitly, it might be handy to use #iHunt's Levels Worksheet:
Part of #iHunt's Level Worksheet, expanded edition from
Kissing Monsters in the Gig Economy
Kissing Monsters in the Gig Economy
It will help you make sure everyone is comfortable with various topics, scenes and so on, and know what things to avoid not to make someone uncomfortable. If the game you wanted to play would feature those elements (say, the problematic "romance" present in Curse of Stradth or Bluebeard's Bride), it would be a good time to discuss them and consider altering those elements, or picking something else to play entirely.
Establish genre conventions
Talking about the boundaries is not only about what a person is comfortable with, but it's also a good time to discuss genre conventions. There is a world of difference between MCU, The Tick, Watchmen and Invincible, even though they all fall under the "superhero" genre.
So establish your genre conventions! Talk about what kind of things you do and don't want to happen. Maybe you want to be a hero and make sure no innocent bystander would die. That is a valid way to play, and as long as everyone is on the same page, it can be fun.
Not every game has to have character or NPC death be the price of failure. Sure, if people want that, it's a valid way of playing, but sometimes you do want to get invested in various characters and stay with them. You can also get a bit more creative with things...
Breaking kayfabe
Kayfabe is a term from professional wrestling that focuses on portrayals of wrestling events as if they were real. Basically, wrestlers always have to stay in character in front of the general public even if they are not in the ring not to break the illusion of wrestling.
In the World Wide Wrestling RPG that part of the genre is emulated - the outcomes of matches are fixed and you're supposed to play into it most of the time. However, you can explicitly Break Kayfabe to change the script and get what you want, but that can risk bad things happening to you since you're going against the genre convention.
If you want to have fun with your game (and everyone at the table similarly are into this), you can play around with that idea of breaking kayfabe. Basically, as long as the players follow their role in the story, the GM similarly is bound by the rules of the genre convention and can't hurt them too much. But then the players can start bending and breaking the rules slowly shifting the overton window to get what they want, at the cost of losing the protection of the genre because they are breaking kayfabe. This could set up an interesting "fall from grace" story akin to:
"A Street Thug Beat A God"
Or on the other hand you could make it into a genre deconstruction where the characters realise that being a superhero that doesn't kill doesn't make you the good guy. There is a good amount of stuff that can be done with this kind of premise.
Conclusions
So in conclusion, make sure you establish boundaries of what everyone at the table is comfortable with, have a chat about what kind of things you want to see within those boundaries, and if you're feeling like toying with those assumptions, see what comes when you tear them down methodically.