This sort of thing seems to happen to Superman on a semi-regular basis. Probably the fact that Superman is glaringly not immune to magic and mental powers, coupled with the possibilities inherent in showing just how badass a character is by having him/her hold off frickin' Superman while at the same time giving the character in question a good reason for why they're fighting a good guy, makes this kind of story just too big a temptation for comic writers to resist.
An old World's Finest comic in which Batman is brainwashed into being a sadistic warder at a prison for Superman has him reflect that hypnotism cannot make anyone do something against their nature, before the narration explains "But this is super-hypnotism, of a kind never before experienced by anyone on Earth!" (It's almost a shame that this was written in the days of simpler storytelling, as a modern telling of the story would have it revealed that Batman would certainly be a warder on Superman's prison if he thought Superman went rogue...)
In Death of the Family, Damian "Robin" Wayne finds himself facing...his father Batman?! Ultimately subverted: it's a martial-arts master in costume who fell behind on a debt to Joker. However, Joker does come dangerously close to pulling this on the entire Batfamily.
In Gothtopia, The Scarecrow has all of Gotham in a gas-induced hallucination, making them think everything is wonderful while attacking anyone who thinks otherwise. This includes the heroes, they eventually break free of the hallucinations and try to figure out what's going on.
Jean-Paul Valley has what is known as The System, a deep brainwashing program used by the Order of St. Dumas for those chosen to be their Avenging Angel, Azrael. The trance is usually activated when the person dons the Azrael costume, turning them into an efficient, though very brutal, assassin. However, when Jean-Paul took over for Bruce Wayne, his first supervillain encounter happened to be the Scarecrow. When he got nailed by Crane's Fear Gas-coated barbs, the System kicked in to get him through it... and never shut off. This sent Jean-Paul over the edge as time passed, leading to him getting more and more brutal with his enemies, nearly killing Robin when he tried to stop him and culminating in the death of Abattoir and Bruce Wayne needing to come back in order to fix things.
In Secret Six Vol 2, the Riddler did something to Sue Dibny to convince her that she's in love with him and to attempt to blow up the Six.
Superboy gets a heavy case of this in Teen Titans, courtesy of his genetic progenitor Lex Luthor. Highlights include shaving his head, cutting an 'L' into his T-shirt, and kicking the shit out of the entire team.
Originally Terra from The New Teen Titans arc "The Judas Contract" was a pure example of an unapologetically evil and antagonistic mole. A flashback from a 2000s comic decided to give her some more backstory and retconned it so that Deathstroke had injected Terra with drugs to make her psychopathic, much like he later did with his daughter Ravager.
In Hex, Jonah's girlfriend Stiletta was kidnapped and brainwashed into become a bloodthirsty competitor in the Gladiator Games. Jonah is later forced into the arena and Stiletta attempts to kill him.
Lady Blackhawk was brainwashed by Killer Shark into becoming the villainous Queen Killer Shark in the Silver Age and it was even hinted that she had a sexual relationship with Killer Shark when she was brainwashed.
Wonder Woman (1987): While Cheetah is far from a hero and fully capable of acting as a bloodthirsty monster all on her own she was developing a sort of friendship with Diana and hated Thomas Randolph when he zapped her with magic to make her into a mindless monsterous version of herself that would attack whomever he directed her to, which included Diana and Artemis.
The team including Robin, Superboy, Wonder Girl and Arrowette fall victim mind control that makes them fight Supergirl at one point, and she helps snap them out of it.
Darkseid himself takes an interest in Secret's vast powers and manipulates her mind to make her fight alongside him against her friends and allies.
At one point a cult worshiping the evil goddess Kali does this to a million children via a television show, and compels them to try and kill their parents.
In Geoff Johns' Author's Saving Throw for Green Lantern, the events of Hal Jordan's crimes depicted in Emerald Twilight were explained away as Jordan falling under the mind control of the evil entity, Parallax, who used Jordan's grief at the destruction of Coast City as his opportunity to do so. With that established, Jordan is thus exonerated from all the horrific deeds he was seen doing.
Thor has been turned against his allies many times over the years, usually delivering a Curb-Stomp Battle until he comes to his senses.
During the "Ends of the Earth" story arc, Doctor Octopus does this to all the Avengers at once, but is tricked into increasing this to Villain Override over Thor, which renders him unworthy to wield his hammer.
The Black Panther storyline "Return of the Dragon" has the title hero fighting Iron Fist after the latter is brainwashed by the brother of the Dragon King.
In Cable & Deadpool, Deadpool is brainwashed by the Black Box to kill the biggest threat to the public safety. After managing to convince Deadpool that this is not a) clowns; b) Simon Cowell; c) Galactus; or d) Karl Rove, Deadpool goes off to kill Cable, who he sees as the next biggest threat. After fighting Prester John and then going through several alternate universes in order to find (and save) that person, he then gets back and tells everyone that he was only looking for him to kill him. He is restrained until the others can remove the effects of the brainwashing. If you understand DP at all, a), b), c) and d) shouldn't have been too much of a surprise.
The reporter Ned Leeds once is captured by Hobgoblin (the original, Robert Kingsley) that brainwashes him making believe him to be Hobglobin, deciding it would be better to have a scapegoat in case he is unmasked. Ned's regular brainwashings by Kingsley cause his marriage and professional relationships to fall apart. Only years after Ned's death, his name is cleared.
Mr. Negative, a new Spidey's villain on the block since Brand New Day, has this of a superpower to do to other people. Inverting their colour scheme, and having them proclaim glory for Mr. Negative while beating the tar out of others they're sent after.
The title character of The Punisher, Frank Castle, premiered as a vigilante who kills criminals. Writers who disagreed with the concept sometimes took it, and Castle over the top, having him kill or attempt to kill petty criminals such as jaywalkers. When Marvel made the decision to give The Punisher his own series, they had to retcon this to make him acceptable even as a dark hero. So they declared that during his crazy periods he had been under the influence of mind-altering drugs.
One of the scariest and most effective instances of this trope occurred when Hydra and the Hand teamed up under the Gorgon to target and kill low-powered but highly-skilled heroes, then resurrect them as Hand assassins. Their first target was Wolverine, who tore through most of Marvel's New York heroes before he was brought down. One of his victims, Northstar took years to get their brain unscrambled, and SHIELD had to resort to decapitating corpses to keep the Hand from getting at them.
The Gorgon himself was recruited to the Hand through the same method. He was already bad though, the Hand just made him worse.
Laura Kinney aka X23 falls victim to this whenever she is exposed to the Trigger Scent. Thanks to the Facility's conditioning, Laura suffers a Pavlovian response to the scent that makes her into a true Living Weapon who will not stop until the people marked with the scent are dead. She blacks out all conscious thought during these times and only comes back after the scent is gone. Just to illustrate how powerful her response to the scent is, in her origin story Innocence Lost she killed the only two people she ever really cared for and who cared for her under the influence of the scent. She also nearly killed her aunt and cousin who only survived because they were able to wash off the scent in time. Emma Frost once claimed that the Trigger Scent response is so deeply ingrained into Laura's brain that Emma can't remove it with her Psychic Powers.
All Fall Down: Along with receiving a new pair of legs, Pronto is conditioned to attack his closest friends, and to love the idea.
During the "Enerjak Reborn" arc, Knuckles was brainwashed by Dr. Finitevus into absorbing the Master Emerald's power and becoming the new Enerjak. It took his father's Heroic Sacrifice to snap him out of it.
This happens twice during the Iron Dominion arc: First, the Iron Queen uses her Magitek powers to take control of Monkey Khan and use him to destroy the Dragon Kingdom Freedom Fighters. Then, she uses those powers to reprogram NICOLE and use her to effortlessly take over New Mobotropolis. Khan was released by the Queen when she didn't need him anymore, and NICOLE was soon returned to normal by Sally (though she continued to pretend to be brainwashed for a while).
The brainwave scanner in the G.I. Joe comic was a feared—and painful—method of brainwashing. It could eventually be broken by a strong-willed individual, and if one was a master of the "Arashikage mind-set" one could free others as well.
Judge Dredd: Judge Death likes to do this to some of his victims, mind controlling them to go on killing sprees. He made Judge Kraken an honorary Dark Judge to help in carrying out "judgment" on the people, leaving Kraken aware enough to know what he's doing and being able to do nothing but weep as he slayed. Several Death impersonators also went crazy and started to think they actually were Death.
Star Wars: Kanan: Commander Grey goes from happily chatting with Depa and Caleb Dume to trying to murder them within minutes of Order 66 being issued. He eventually manages to snap out of the programming several months later after speaking with Caleb, who points out everything wrong with the "Jedi are traitors" scenario.
In Violine, Violine's father is hypnotized into killing Violine.
In Y: The Last Man Yorick's sister Hero falls under the influence of Victoria, the man-hating cult leader of the Daughters of the Amazon, so much that she's prepared to kill her own brother, as well as shooting a young girl in the head on Victoria's order. Even after Victoria is killed Hero still has her voice inside her head.