If you're struggling to do something, nothing can give you more satisfaction than success. That's why thinking you've succeeded at something when you really haven't can be really annoying or even downright torturous. Considering that, you have to wonder why the minds of people, both real and fictional, insist on forcing them to experience visions of such things as having dead relatives come back to life, marrying lost loves, escaping life-threatening situations, becoming rich/famous and even just getting out of bed when we're tired in the morning, even though they all have to inevitably end with the rug being pulled out from under you. Basically, if you don't know the meaning of "I can take the despair, it's the hope I can't stand," this clearly has never happened to you.
Often in fictional works, the audience is led to believe along with the character that the hallucination/dream is real. We learn it wasn't real only in usually very creepy and ominous reveals, a reveal that usually involves somebody saying something like, "But you never really got out!!!"
- The Big Bad's Eye Of The Moon Plan in Naruto involves shrouding the world in an "Infinite Tsukuyomi". This would trap every living person in a permanent illusion, ceasing all conflict by purging free will itself from the world, so everyone could live in a reality without war or suffering.
- In Fate/Zero, Matou Karia hallucinates that he was able to save Sakura as he dies right in front of her.
- In Yu-Gi-Oh! GX, Atticus/Fubuki hallucinates that he is able to finish his duel with Fujiwara in a draw. Moments later, it turns out Fujiwara landed the winning blow a couple turns ago.
- In one of the earliest installments of the original Yu-Gi-Oh! manga and anime, Yami Yugi challenges a would-be psychic to a Yami no Game. When the fake psychic is clearly going to lose, he starts imagining himself having real psychic powers and winning the game, even as he winds up bitterly losing in reality.
- Weaponized by the Big Bad in Bleach: He could use his Master of Illusion powers to simply win fights immediately, but instead prefers to make his opponents think they've succeeded first. In an infamous scene, he is apparently impaled and killed by another character. The illusion then drops to reveal that Aizen switched places with the attacker's close friend. He really likes getting their hopes up.
- At the end of JoJo's Bizarre Adventure: Diamond is Unbreakable, Yoshikage Kira believes that he was able to activate Bites The Dust and defeat all the heroes. But as he cackles about his victory, he notices that a bird just flew through him... leading him to come to the slow realization that he was killed and is now a ghost stuck in the Ghost Alley. Reimi, his first victim from many years ago, then appears to him and forces him to remember the real ending of his fight with the heroes, where Kira is not only stopped from activating Bites The Dust by Koichi and Jotaro's combined efforts, but is also subject to an Undignified Death at the hands of an ambulance meant to save him.
- In Astonishing X-Men, the planet-busting bullet sends out a hypnotic suggestion, making all the heroes gathered to stop it stare vacantly, imagining them stopping the bullet instead of actually doing something about it. Spider-Man breaks free when he realizes his powers couldn't possibly stop the bullet.
- in 127 Hours, when a sudden storm comes, Aron moves the boulder under the flooding waters, and imagines running off to meet his girlfriend. Instead, he realizes at the last moment that he's still in the canyon.
- In the end of Brazil, the hero seems to be able to escape from the government torture chamber, but it's revealed that he's just hallucinating. Well, it's a kind of escape...
- Requiem for a Dream ends with Harry's mother Sara living in a fantasy world where she won a game show's grand prize and Harry and Marion are happy and successful together, while in reality, all three of them have become drug addicts with zero prospects for the future.
- The ending of Inception is a heated debate on whether this is the case or not. Cobb leaving his totem spinning while he chooses to see his children's faces for the first time, not actually confirming whether he's still dreaming before the film ends.
- In Harold & Kumar Go to White Castle, Harold imagines himself finally working up the nerve to flirt with his attractive neighbor Maria in the elevator. In actuality, he and Maria ride the elevator in awkward silence.
- Parasite: at the end of the film, Ki-woo works hard, gains wealth, and eventually saves enough to buy the house where his father is trapped living in the basement. This is, of course, revealed to be merely his imagination- as fitting with the film's themes of classism and poverty, it is strongly implied he will never be able to.
- Dr. House hallucinates sleeping with Dr. Cuddy and getting over his Vicodin addiction. It takes him a full day to figure out that it didn't really happen.
- in the season six finale of Cold Case, Detective Lilly Rush's car gets run off the road and into a river. She hallucinates escaping and solving the case of who did it. Weirdly, she apparently guesses right, going by the shots of arrests in the real world at the end of the episode.
- In the Star Trek: Deep Space Nine episode "Hard Time". Chief O'Brien said he frequently dreamed about flying back to the station during his 20-year prison sentence. The irony is that the 20-year sentence turned out to be an artificial dream.
- In How I Met Your Mother, Barney goes to the brunch to tell Nora about his feelings, but stops at the door, seeing Nora and her family. He enters the restaurant, making a heartfelt apology. Nora forgives him, and introduces him to her parents, for whom Barney performs a magic trick. However, the scene turns out to be a figment of Barney's imagination, and he leaves before Nora sees him.
- On It's Always Sunny in Philadelphia, Mac is given the chance to hit a goal at a Flyers game. He takes to the ice and nails what announcers call the best goal ever seen. Mac is cheered by the crowd chanting his name...which turns out to be Charlie calling out to him as Mac (who's never skated in his life) took one step on the ice, fell on his face and was knocked out to the laughter of the crowd.
- Subverted in Malcolm in the Middle. A whole episode revolves around Lois imagining that she had daughters instead of sons (interspersed with the reality of trying to handle three boys). At the end, the imaginary daughters turn out to be lying and manipulative, with problems ranging from eating disorders to teenage pregnancy.
- Happens in Hikonin Sentai Akibaranger frequently. In the first episode, for instance, Nobuo is riding his bike when he sees a thief steal a woman's purse. He rides the bike down a flight of stairs, takes down the thief with some Bike Fu, and hands the purse back to the woman- only what actually happened was that he fell off the bike on the way down the stairs, and the woman picked it up and tossed it at the thief herself. Indeed, the entire premise of the show starts out as one of these, as rather than really becoming a Sentai team as they first thought, their battles take place only in their minds. However, after some encouragement, they're okay with this, thinking it'll improve them as people. Later episodes give their battles real consequences.
- In Scrubs, when JD has to deliver bad news to a patient, he stops, and instead spends the episode working to get the test redone, thinking the machine, known to be faulty, might have given incorrect results. With the help of his friends, he accomplishes it, and the results are good. We then cut back to the beginning of the episode, JD dismisses the fantasy we just saw as pointless wishful thinking, and steps forward to deliver the bad news.
- Street Fighter III: Sean's ending in 3rd Strike initially shows him celebrating over a fallen opponent, bragging about having become the U.S. Champion... cut to him severely bruised and laid out on the mat. He didn't even manage to get past the qualifying rounds.
- Wolfenstein II: The New Colossus: After being captured by the Nazis, B.J. Blazkowicz is placed on trial and sentenced to death. He proceeds to break out of his restraints and slaughter his way out of the courtroom. It almost looks like he's really made it, until he reaches the exit and finds instead another room with his long-dead mother waiting for him. After a heartfelt conversation, she warns him that he has "one more hardship to go through." He wakes up back in court as the guards prepare to remove him to his place of execution.
- The Order of the Stick: Girard's Gate, created by illusionist Girard Draketooth and guarded by his descendants, is naturally filled to the brim with illusions (at least it was before Girard's family was wiped out). One of the illusions traps the victim in their idea of a happy ending. Elan of all people breaks the Order out of it by realizing that his idea of a happy ending (his mom and dad getting back together) is totally infeasible, especially since he's learned that his dad is a scheming warlord and utter bastard.
- In The Simpsons episode "King of the Hill", Homer has one when he's climbing Springfield's tallest mountain and starts noticing the change in air pressure, to make the climb easier he decides to take the escalator up the mountain while a Yeti carries him further then finally using a bubble to float the rest of the way. He's actually sliding down the mountain while hallucinating.
- In some episodes of The Drinky Crow Show, the titular character gets drunk and thinks that he's doing something well when in reality he's doing it horribly. In one episode, Drinky is trying to perform surgery on a physically deformed man. In his mind, Drinky made the patient normal-looking, when in reality he smashed the man to a bloody pulp.
- In the Family Guy episode "Deep Throats", Peter and Lois enter a talent show and start taking pot to help their creative process. The night of the show, they imagine they're singing a duet about God accepting all people despite their appearance, when in reality they're just making a whole bunch of loud noises.
Peter: I can't believe we lost the talent show! What'd we do wrong?
Chris: Well, I think I can shed a little light on that. You guys were so baked, you didn't sound anywhere near as good as you thought you were. I was in the audience.
(Flashback to Chris in the audience staring in disbelief as Peter and Lois are on stage yelling into the mic)
- In the Christmas episode of The Looney Tunes Show, when Daffy and Foghorn Leghorn are looking for a power outlet in the North Pole to plug a giant fan into, Daffy suffers hypothermia and hallucinates that he finds Santa's workshop. When they play the recording from the camera attached to his helmet, it shows that in reality he found a cave and Santa and his elves were a polar bear and its cubs.
- In the Regular Show episode "Return of Mordecai and the Rigbys" the gang accidentally destroy their instruments before competing in a Battle of the Bands, so they sing their song as an a cappella until the music within them generates new instruments and they win the competition. In reality, they passed out from heat stroke before competing and got last place, then woke up in the hospital.
- The Justice League episode "For the Man Who Has Everything", as part of his plan to conquer Earth, Mongul sent a plant called Black Mercy to Superman due to believing the Man of Steel was the only real threat to his hopes to conquering the planet. Once attached, the Black Mercy fed Superman a reality where Krypton never exploded, he was a simple farmer with a wife and son, and his father is a disgraced old man. Batman attempted fruitlessly to several different means to remove the plant but was only able to succeed when Superman himself realized that the reality was a fake. Unfortunately, the Black Mercy then attached itself to Batman and fed the Dark Knight a reality where his father and mother survived the night of their deaths and his father fought off the gunman that killed them. Wonder Woman managed to get through to Batman and remove the plant, barely getting caught herself. Wonder Woman then threw the plant at Mongul, incapacitating the former warlord.
- In the first episode of OK K.O.! Let's Be Heroes, K.O. goes off to fight Darrell in his first day working at Lakewood Plaza. At first he appears to be winning, giving Darrell a good trashing, but then he's woken up by A Real Magic Skeleton and informed that he was knocked out cold as soon as the fight started.