Helpful Hallucination

Detective Bob is a detective. He's in the middle of an important case when, suddenly, a whole bunch of traumatic stuff happens to him, he hits his head on an orange crate, and he somehow ends up taking a lot of drugs. Now, wherever he goes, he is followed by a talking, pink hippopotamus name Oswald, that only he can see. Bob is hallucinating!

This is bad for the case, right? Clearly, Bob is no longer mentally fit to do his job, and should go somewhere to receive treatment until Oswald goes away. Right? RIGHT?

Wrong.

For you see, Oswald is a manifestation of Bob's subconscious. He thus knows all about the case, including details that Bob apparently ignored or didn't quite put together. So instead of impairing Bob's ability to function, Oswald is basically akin to temporary mental superpowers, helping to point Bob in the right direction.

In real life, hallucinations usually aren't so helpful, and you probably shouldn't take advice from one.

Compare Dreaming the Truth and Spirit Advisor.

For extra creepiness, the hallucination may know things the person they haunt shouldn't know. This is usually a clue they are a ghost or an Angel Unaware.

SPOILERS to follow, as some of these hallucinations aren't identified as such until The Reveal.

Anime

 * "Radar Man" from Paranoia Agent appears to have this happening to him. Or...the sexy figurines might actually be talking to him. It's that kind of show.

Comics

 * In the Sin City story The Big Fat Kill, while driving Jackie Boy's corpse to the tar pits for disposal, Dwight starts hallucinating that Jackie Boy's talking to him, taunting him about how screwed he is about the whole situation. Dwight answers "Sure, he's an asshole. Sure he's dead. Sure, I'm just imagining that he's talking. That doesn't stop the bastard from being absolutely right."

Film
"Gusteau: I have a son?!
 * Played with in Ratatouille, where Remy hallucinates Gusteau advising him about cooking, and life in general. Until Remy finds out Gusteau has a son:

Remy: How can you not know you have a son?

Gusteau: I am only a figment of your imagination! You didn't know, how could I?"

Literature

 * Diario De Un Zombi has Erik, a masked opera dancer who leads the protagonist to the last living humans in Barcelona.

Live Action TV
"Raines: What do you want?
 * In last couple of episodes of the fifth season of House, House gets advice on a case from a hallucination of, who had died in the season four finale.
 * Happened a few times on Bones:
 * Bones hears the murder victim telling her information about herself and the case.
 * In the Hockey episode, Booth gets advice on the investigation from a famous NHL player after being knocked unconscious.
 * When Booth was trapped by the Gravedigger on a ship that was to be sunk he received help from the ghost of a private who died in Bosnia(?) while under Booth's command. Booth knew it was a hallucination, but there were things that he did needed two people to do.
 * Or, if you prefer Doing in The Wizard, he could have been hallucinating the obstacles as well as the ghost who helped bypass them.
 * When Booth was about to have A Date With Rosie Palms to donate sperm for Brennan to artificially inseminate with, Stewie from Family Guy appeared on the TV and gave him relationship advice.
 * In the Eureka episode "The Ex-Files", Carter's hallucination of Stark seems to have a bunch of knowledge that you wouldn't expect him to. Most of that knowledge (like Stark's shoe size) is totally useless, though he does point Carter in the direction of one particular clue that's important to the episode plot.
 * The (unfortunately) short-lived TV series Raines wore this as it's hat. The main character, a police detective played by Jeff Goldblum, had hallucinations of the victims of the crime he was investigating, who followed him around until he solved the case. The hallucinations would actually change slightly in appearance and manner as he learned more about the victim. He was completely aware of them not being real--in fact, the hallucinations would sometimes comment on it.

Sandy Boudreau: It's your imagination, Detective; I'm just a figment.

Raines: What do you want?

Sandy Boudreau: I want you to find out who killed me.

Raines: Then you'll go, back to whatever dark, twisted, malfunctioning part of my brain that you come from?

Sandy Boudreau: Yeah."


 * May occur in Twin Peaks, particularly The Giant who appears at critical moments to give Cooper hints on the case. This being Twin Peaks, however, it's unclear whether it's this trope in action or something else.
 * In CSI: Miami Eric gets shot in the head. When he recovers, he hallucinates Speed, who died several seasons ago. The hallucination points him to evidence he missed, and helps him crack the case.
 * In the The West Wing episode "Two Cathedrals" (which is widely considered one of the greatest single episodes of television of any genre in the history of the medium), President Bartlett has a soul-searching conversation with his personal secretary, Mrs. Landingham, for whom he attended a funeral earlier that same day.
 * On NYPD Blue Sipowitz had a hallucination conversation with his dead partner Bobby Simone, who convinced Andy to take his new young hotheaded partner John Clark Jr. under his wing rather than let him go his own way, which was leading down the wrong path.
 * Fringe: while trapped on the other side and brainwashed, Olivia hallucinates a version of Peter who tries to convince her that she's in the wrong universe.
 * Stargate Atlantis: When McKay gets trapped at the bottom of the ocean in a broken puddle jumper, he has a hallucination of Carter that's his subconscious trying to keep him from doing something that will get him killed.
 * In a grim variant, Gibbs' former marine commander on NCIS wound up a fugitive when he was suspected of stealing a cache of Saddam Hussein's money recovered in Iraq. He was goaded on in his quest to find and eliminate the real thieves by a fellow marine, who turned out to be an hallucination of a man who'd died in combat years earlier.
 * In the episode immediately after Kate was shot, most of the cast either imagined or outright hallucinated a parting conversation with her ghost.

Western Animation
"Spirit guide: I'm only a memory, Homer. I can't provide additional information."
 * Lampshaded on The Simpsons when Homer tried to access information from his coyote Spirit Guide while conscious:


 * The Twin Peaks example is spoofed on "Who Shot Mr. Burns, Part 2".

Literature

 * In The Story of the Stone, Master Li and Number Ten Ox drink hallucinogenic tea in order to take a "mind trip" to the Chinese Hell; it is deliberately ambiguous whether their experience is this trope or a genuine spirit journey.
 * Erik in Diario De Un Zombi.