You Keep Telling Yourself That

"Jane: He must not be undeserving, as we thought. He must truly be in love with her, I think. Mr. Bennet: You think that, Jane, if it gives you comfort."

- Pride and Prejudice (the TV adaptation, not the book)

From an argumentative standpoint, it's pretty hard to get anywhere against the Well-Intentioned Extremist. His motives are good, after all, as he has a better rationale for his actions than just For the Evulz.

This trope is what happens when, as the Well-Intentioned Extremist is making his case, someone calls him out on it. He makes a point that, hey, just because you Pet the Dog every once in a while, that doesn't mean it's OK for you to be a total genocidal Jerkass. If you want to tell yourself a story about how great you are so you can live with yourself, go ahead. But spare me your crap.

Interestingly, this rarely ever actually gets a villain to rethink his point of view. From a narrative standpoint, this kind of speech exists mainly to avert a Draco in Leather Pants situation by pointing out just how shallow the villain's worldview really is.

Alternatively, a villain can say this to a hero, but with more mixed results. Sometimes the villain may have a point, but other times he'll be shown as being too callous and pathetic to understand that, yes, some people really do value abstract things like friendship.

Compare Shut UP, Hannibal.

Anime & Manga

 * In Ghost in the Shell, Batou says this to a terrorist who's been  in between his cheerful business of planting bombs in glass skyscrapers so the shards act as shrapnel.

Film
"Stella Bridger: "You know this was never about the gold." Steve: "Whatever helps you sleep at night, sweetheart."
 * In the climax of No Country for Old Men, Anton Chigurh confronts Carla at her home, explaining that he has to kill her because he promised her husband Llewelyn that he would. Carla points out that this is crazy, and makes no sense. He goes on explain that he offered Llewelyn a chance to save Carla's life, but Llewelyn instead decided to use her to try and save himself. Carla calls him out on how that wasn't Llewelyn's rationale at all and Chigurh's twisting his words around. Finally, Chigurh lets her call a coin toss to get a chance to live. She refuses to call it, saying that Chigurh's only doing it so he can mentally conclude that he's "giving her a choice", when in reality, he's in complete control of the situation and the only one making any choices at all. This scene is the closest the movie comes to a loss for Chigurh, because Carla brings no outside knowledge into the conversation. He could justify the enmity of every other character in the film because they're his enemy and have reason to hate him. Carla's words, by contrast, deal entirely with the current situation. Chigurh has no reason to kill her at all, and is so randomly destructive that he doesn't have any more genuine human feeling than a car crash.
 * In X-Men 1, when Magneto is making his final speech to the heroes about how the turn-everyone-into-a-mutant-beam is going to bring peace to the world and is worth the sacrifice, Wolverine is not impressed. He quips that if Magneto really believed everything he was saying, he would have just used himself to power the doomsday apparatus rather than Rogue. One realizes that, if Magneto had in fact done this, his plan would have succeeded without a hitch (though considering that he sees himself as the one thing keeping mutants out of the death camps, he wouldn't sacrifice himself unless he was 100% certain of the outcome).
 * A villain-to-hero version occurs in the 2003 remake of The Italian Job.

[Stella responds by .]"

"Elizabeth: It never would have worked between us. Sparrow: Keep tellin' yourself that, darling."
 * Pirates of the Caribbean: Elizabeth to Jack Sparrow.

Literature

 * In the Dale Brown novel Edge of Battle, Zakharov tells Comandante Veracruz - from one villain to another - that he doesn't actually believe the Mexican ultranationalist rhetoric he's spouting from his own mouth and that it isn't fooling the former.

Live-Action TV
"Tim: Well just keep telling yourself that Daisy OK, but I think I am big enough and ugly enough to make my own mistakes!"
 * Performed by The Doctor on the villain of the Doctor Who episode "Boom Town", who was trying to rationalise that she wasn't pure evil because.
 * In Spaced, Tim uses this line during the Tekken scene when Daisy protests that "spending hours bogeling to Aswad" was research:

"Daisy: Well Sarah obviously agrees!"
 * Daisy does it right back to him in the same argument (and ends up winning it), because the current topic is about whether Tim's right to get back with his manipulative ex-girlfriend.

Video Games
"Bann Teagan: You know the Queen hates it when you call her that. King Alistair: No she doesn't. Just because she killed an Archdemon... she doesn't scare me.
 * Knights of the Old Republic has Carth and Canderous firing this line off to one another during their "warrior versus soldier" banter. Canderous asks Carth as a "fellow warrior" what glorious battles he's been in. Carth says he's not a "warrior," he's a "solder"; soldiers "protect and defend the innocent, usually from warriors." Canderous snarks that Carth can keep telling himself that, but really they're the same, and at least he can admit it. A warrior only needs to justify himself through victory. Carth points out that the Mandalorians actually lost the war. Canderous says they only lost because the Republic had more resources. Carth snarks right back that he can keep telling himself that.
 * At the end of the canon route of Blaze Union, this seems to be what Medoute is trying to say to ; her own Fantastic Racism makes her rationale very shaky, however, and this quickly degenerates into a vicious and painful argument in which everything the former accuses is met with a Shut UP, Hannibal and everything the latter tries to defend himself with gets a Shut Up, Kirk.
 * As part of an Old Save Bonus, in Dragon Age II, if the hero from the original game married Alistair and took the throne with him, he'll refer to her as "the old ball and chain" when he shows up for his little cameo.

Bann Teagan: You keep telling yourself that, Your Majesty."

Western Animation

 * In the Family Guy episode "Fast Times at Buddy Cianci High", Lois is doing laundry and reads a note in Chris's pocket; she justifies herself to Stewie because, "Mommy doesn't usually read things out of Chris's pocket. She's more respectful than that." Stewie responds, "Yeah, whatever helps you sleep at night, bitch."