Example one.
Someone in a panic is running away and about to jump threw a window they wrongly think is on the first floor.
Is it good to mind control them to stop them (Professor Xavier style from the X-men movies) from unknowingly jumping out the eighth floor?
Why is this person in a panic and thinking they're on the first floor? Because depending on the circumstances, this could be
removing fear from a person, not taking over their mind.
If this is just a normal panic and/or delusion, this is using an evil action to a good end.
Example Two.
The Borg are overwhelming the Enterprise and Data is scared and panicking. Piccard recognizes this and orders Data to disconnect his emotion chip. Data follows the order and mind controls himself by taking out his emotions chip to deal with the situation without panic.
Data would have the option of disobeying the orders, just like every other Starfleet officer has. There would be consequences, yes, but again, just like every other Starfleet officer would face if they disobeyed an order (and I have a hard time believing that Picard would write Data up or throw him in the brig or something for disobeying this order).
Also, in this case, it boils down to him being a consenting adult who is choosing to disconnect his own chip. This isn't mind control, anymore than a person who is into meditation (or taking a mind-influencing drug) is mind controlling themself.
Substitute D&D paladin remove fear abilities.
Again, something that is consensual and, in this case (as with the X-Men example above) more protective than actual mind control.
Although, at my table, the players (due to in-character things) usually ask one another (in-character) if it's OK to cast spells on each other.
Example three.
Someone has OCD they don't want. They ask a mind controller to suppress or eliminate their OCD, so it is consensual mind control to achieve a desired quality of life improvement.
Again,
consent is the key.
In D&D, nobody is saying, "Hey, you guards, mind if I cast
charm person on you so I don't have to kill you?" That would be ridiculous.