Max Brooks's World War Z : There's a sequence involving a pilot talking over the radio to another person who got her safely out of a zombie-infested area. Or was she talking to anyone at all...?
Charlie and Lola: Lola has an imaginary friend by the name of Soren Laurenson. This would be one of the cases where the kid with the imaginary friend is perfectly happy and well-adjusted, she just has a somewhat overactive imagination.
Helen Cresswell's Bagthorpe: The youngest cousin, Daisy, has an imaginary friend called Arry Awk (the name comes from a folksong). Daisy is a strange child who has fads, such as setting things on fire and burying sausages in the garden, and she blames Arry Awk for all her misdeeds.
In Andrew M Greeley's God Game, a man's computer affects a fantasy kingdom (and the people around him) and characters from the game start appearing to him to ask for plot changes.
Kevin Henkes's Jessica: This picture book features girl who is initially reluctant to start kindergarten due to fears of leaving Jessica, her imaginary best friend, but eventually befriends a classmate who happens to share the name.
Middle School: Rafe's friend Leo turns out to be a figment of his imagination.
José María Sánchez Silva's Goodbye Josephina: This Spanish children's book (originally Adios, Josefina) has a preteen boy from post-war Madrid with a whale as his friend, they go on imaginary adventures, boy starts seeing life in a better way, boy slowly grows up and lets go of imaginary friend... It inspired Kujira no Josephina.
In Anne Tyler's Earthly Possessions, the narrator's daughter has an imaginary friend "Selinda" for whom a place must be set at the table; after a while, the daughter sits in Selinda's place and insists that she is Selinda, and that the daughter is the imaginary friend. She is always referred to as Selinda from then on.
Sort of the point of the end of The Lace Reader: Towner's best friend as a child was her twin sister, Lyndley, who committed suicide when they were teenagers. Lyndley was really her twin Lindsey, who died at birth. Much of Lyndley's fictional traumatic childhood was based on Towner's real past.
The novel The Other. The narrator and his twin brother deal with a host of calamities. The narrator has no brother, and he's a murdering sociopathic monster.
In the novel Chocolat, the protagonist's daughter has an imaginary friend who is a Kangaroo.
In The Graveyard Book, Scarlett thinks that Bod is her imaginary friend until she meets him again when she becomes older.
In Patricia A. McKillip's contemporary novel Stepping from the Shadows the narrator's "ugly sister" turns out to be her alternate personality. And this was published at least a decade before Fight Club.
The "Dumarest of Terra" books Haven of Darkness and Prison of Night by E.C. Tubb involved a world where daily flares of stellar radiation induced detailed hallucinations of dead acquaintances, friends and enemies alike. Extensive conversations often occurred with these "ghosts."
The Gone-Away World is weird about this. The main character was the imaginary friend of The Ace, serving as the inspiration and motivator for all his deeds, and became real as the result of Applied Phlebotinum. His memories are a hybrid of what really happened and what The Ace visualized as happening, along with a few things that never happened (for instance, he thinks he's married to the woman who the ace original actually married.) Just to hammer in the weirdness a little more, it's heavily implied that the narrator is the imaginary friend of both The Ace and a wizened old kung fu master who really likes tupperware.
In John Varley's The Golden Globe, protagonist Kenneth "Sparky" Valentine's imaginary friend turns out to be a symptom of a disassociative personality disorder caused by years of suffering at the hands of his abusive father, Kenneth Sr.
This is also the plot to Me and Emma by Elizabeth Flock.
J.D. Salinger's story "Uncle Wiggly in Connecticut" is about habitually drunk wannabe socialite Eloise's lost afternoon spent with a close friend half-remembered acquaintance, to whom she happily relives moans about their Glory Days in college. Her daughter Ramona seems to have little purpose in the story other than to demonstrate how Eloise neglects her. Ramona—insisting her friend Jimmy Jimmereeno is corporeal—makes room in bed for him (which annoys her mother). No need to use spoiler text, as this short story—like most of Salinger's—is anti-climactic. (Perhaps—after "A Perfect Day for Bananafish", and "Teddy"—Salinger felt he'd written enough jarring endings for a lifetime.)
In the Discworld novels, when Agnes Nitt was young, she used to blame things that went wrong on "the other little girl". "The other little girl" is now Perdita; somewhere between a Split Personality and the part of your mind where all the thoughts you don't dare think go. And she and Agnes don't get on.
Earlier, in Small Gods, desert-dwelling religious hermit S.T. ("Saint") Ungulant has an imaginary friend called Angus. Because the small gods of the desert don't miss an opportunity to latch onto anyone's belief, even a delusional crackpot's belief in his imaginary friend, Angus is "real" enough to hit a lion over the head with a rock.
In Snuff, it's revealed that Sam Vimes' son has an imaginary friend named Mr. Whistle, "who lived in a house in a tree but was occasionally a dragon."
Anne of the Anne of Green Gables series starts out having two imaginary friends: her reflection, whom she imagined was another little girl who lived in an enchanted world, and another little girl named Violetta, based on an echo she heard in a meadow near a home she grew up in. Marilla does not approve, and tells her it will be good to have a real friend to replace her imaginary ones.
In the sequel Anne of Avonlea, one of Anne's students, Paul Irving, has some imaginary friends that he collectively refers to as the "Rock People".
In the book Magic for Marigold, also by L. M. Montgomery, Marigold has an imaginary friend named Sylvia.
A teenage example: near the end of The Basic Eight, Flannery discovers that her best friend, Natasha, is a figment of her imagination.
In the short story "Faithless Margaret", (appeared in Wiggansnatch 18, Feb. 1986note Wiggansnatch was the creation of James Moore Laughing Otter, a gay pagan interested in the traditional connection of gays and shamanic magic. He organized gay pagans to march in Seattle Pride, studied and taught rituals, and eventually died of AIDS in 1988.), an old man, Mr. Humple, has an imaginary companion by that name who shares his life, takes bus rides with him and generally livens things up. Then the pair meet an old lady, Mrs. Crowley, who has an imaginary companion named Charles Whitcomb. In the final scene the old man and woman ride the bus sullenly apart, angry and bereft — Margaret and Charles apparently hit it off and now ride the bus together, abandoning their respective people.
In Zilpha Keatley Snyder's The Changeling, both Martha and Ivy have imaginary friends when they meet; Martha's is a protective lion, and Ivy's is Nicky, a Native American boy. Ivy's baby sister Josie sees and chats with all sorts of people, at least one of whom may actually be a ghost.
Adam Gopnik's Bumping Into Mr. Ravioli is an essay about his three-year-old daughter and the elusive Charlie Ravioli, who was apparently so busy that they rarely had time to do more than "grab lunch" or chat for a minute on the phone. Mr. Ravioli even had a receptionist who said "He's in a meeting right now, may I take a message?" Gopnik's sister, a psychologist, tells him imaginary friends and paracosms are actually what children use to orient themselves in reality. Truth in Television as several professionals have recently published books on these subjects.
Life Among the Savages, Shirley Jackson's essays based on her family, describes a shopping trip with her son, daughter, and her daughter's seven daughters, all named Martha, whom Joanne has adopted after their real parents killed each other.
"Carrie-Barry-Annie" by Ethel Calbert Phillips is the story of Margery and how she looks after her slightly absentminded friend. When Margery starts school she immediately realizes that Carrie cannot come with her. She gives her into the care of a sickly child named Gennifer, who sees Carrie as a winged creature small enough to live in a china house on the mantelpiece. She flies out at night and doesn't come back until morning.
The main character in Anthony Boucher's "Mr. Lupescu" pretended to be an imaginary friend—a fairy godfather, to be specific—so that he could shoot the father of the kid the pretense was centered on, get off scot free and marry the mother.
In Newsflesh adult Shaun Mason conjures one as a result of grief from events in the first book, Feed. As his Sanity Slippage worsens in the second book, Deadline, he goes from just being able to hear the voice of his dead adopted sister (and lover) George, to being able to see the imago before his eyes. On several occasions, he can even feel physical contact.
The Swedish children's book series Alfons Åberg by Gunilla Bergström, published in English as Alfie Atkins, has Alfons' imaginary friend Mållgan (Malcolm or Moggy in the English versions), an albino version of Alfons who he often plays with when his father is busy. He also tends to use Mållgan as the occasional scapegoat to get out of trouble. In the 1976 book Vem räddar Alfons Åberg? (Who'll Save Alfie Atkins?), Alfons befriends Viktor, another boy in his building, and Mållgan, aware that Alfons is outgrowing him, leaves in search of someone else who needs an imaginary friend.
In The Amy Virus, Cyan imagines a spectral version of her favorite singer Amy Zander following her around and talking to her. Spectral Amy disappears at the end, when Cyan no longer needs her.
Dinosaur from Dinosaur Vs has an imaginary whale, which he waters in "Dinosaur vs. the Potty".