The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at You Know, That Thing Where.
That's covered by I Did What I Had to Do.
I wouldn't mind failure so much, if I didn't fail so much.^^The OP is asking about when the hero betrays his team for the greater good.
Heroic Team Revolt is the complete opposite. That's when the hero's team abandons him for committing an act so heinous, that it crosses 'the line'
I wouldn't mind failure so much, if I didn't fail so much.Agree with Miin U. Could also be Utopia Justifies the Means if it's specifically to make the world "perfect".
good guy betrays his friends for the greater good