Osamu Tezuka's /Phoenix manga chapter 'Future' has antagonist/anti-hero Rock Holmes, contemplate being the last sole-survivor of mankind after a nuclear war has broken out and ravaged the Earth. Slowly dying to radiation poisoning, the fact that an all-powerful divine Phoenix entity exists, and is no doubt watching, does not console him. He sits over a smoldering crater of a vaporized megacity, and starts laughing.
One Piece has Brook, who after a series of particularly unfortunate circumstances ends up spending nearly fifty years without sunlight or contact with any other living thing. Because of a promise he'd made he couldn't even kill himself. The brief flashback set ten years into his ordeal leaves little doubt that he's gone off the deep end, to say nothing of when the main cast finds him after another forty years.
Made worse by the fact that he's made immortal by a Devil Fruit power, meaning that he doesn't even have a natural death to look forward to. When Bender said that the only thing that kept him sane was having an eternity in which to perfect his art, he lasted two minutes before he gave up. Brook kept going for half a century. To be fair, though, when he is finally free of his imprisonment, he uses the skills he acquired in fifty years of isolation to become a world famous musician during the two year Time Skip.
The lack of a natural death is (mercifully) debatable fanon, however. In his introductory arc he referred more than once to the fact that his second lifetime is expected to simply run out eventually.
This trope is emphasized by the fact that Brook's remaining crew dies while playing a song. As they die, he comments that it's only a quartet, trio, duet and finally solo, resulting in the (former) page picture.
To add some more perspective on this, one chapter was dedicated to reviewing the timeline of the universe. When the rest of the Straw Hats were just starting to go through their tragic pasts, Brook was still by himself, amusing himself by leaning up against walls at various angles.
In obscure doujinshi series Mythic Quest, every human in the world is transported to a different dimension at the beginning of the Sorcerer's Curse arc. Except one, the female lead. For five years.
Pandora Hearts has Alice, the B-Rabbit, spend a lot of time alone in the Abyss.
Black Mage Zeref of Fairy Tail spent centuries in self-imposed exile after he realized the value of human life one day and lost control of his death magic because of it.
Takahiro Aramaki of 7 Seeds is the only survivor of Team Winter... who turn out to have awakened from cryostasis about fifteen years before the other teams. He spends the intervening time alone except for his dogs; while he doesn't go crazy, he's very rusty at dealing with people by the time he meets the other survivors.
L was this prior to his first on-screen appearance in Death Note, by his own choosing.
In Hulk: The End, the Hulk is the only survivor of a nuclear war. He, and his alter ego, Bruce Banner, are still alive hundreds of years after everyone else died. Banner grimly conjectures that he and his monstrous alter ego were spared as the atoner(s) for mankind's self-destruction, due to the Hulk, having been created in a radioactive explosion, being something of a walking symbol of the Nuclear Age. Finally, the Hulk becomes truly alone when Banner succumbs to a heart attack—even though Hulk retains the ability to revert to human form, Banner is no longer present in their shared consciousness, and Hulk realizes that changing back will mean his death as well.
"Hulk is the strongest one there is!! Hulk is the ONLY one there is!! Hulk is the only one there is!! Hulk feels...cold."
It is strongly suggested that Banner died of the heart attack. An internal dialogue has Banner pleading for the Hulk not to take over so that he can finally die and let Hulk be alone like he always wanted; it's implied that the transformation was held off just long enough to accomplish it. At this point in the story, they are two fully separate entities that hate each other, and Hulk's healing factor is the only thing keeping either alive.
The short-lived The Last American, from Marvel's Epic Comics line, was about this.
In a What-if tale in the Marvel Universe, Cain Marko, the Juggernaut, has powers that make him invulnerable and immortal. He wanders the Earth because a strange plague had wiped out both humankind and mutants. He discovers a stronghold of surviving mutants. Magneto tries to stop him. He cannot. When he get to them, the survivors inform him that he has the plague but cannot die because his power made him immune. Cain is immortal, but he has doomed all that remained of mutantkind. They ask for him to leave before they die. Cain, who always was a dick, agrees with them. He roams the really solitary Earth, thinking about the truth about his battlecry: Nobody can stop the unstoppable Juggernaut.
God in Preacher was this, being the first and only being before Creation. Many of the terrible things in the story happen because of his pathetic need for love and attention.
I Am Legend. Robert Neville even holds full conversations with mannequins he has set up in stores, and completely flips out demanding to know if they are actually alive or not when he finds one has moved on its own. Turns out one of the vampires moved it as bait.
The Noah (1975). The protagonist is the sole survivor of a nuclear war.
Moon (2009). Sam Bell is nearing the end of a shift maintaining Helium-3 mining operations on the far side of the moon. Unfortunately, his only company is a computer (GERTY) and his contact with the outside world is restricted to occasional transmissions bounced off other planetary bodies. He spends his days comforting himself with the fact that he'll soon be reunited with his wife and baby daughter... but after three years effectively on his own, he's starting to crack...
The protagonists of the indie flick Nothing. Hordes of angry people are settling on their house, they are hiding in a room, crying and hugging... and suddenly everything apart from them and the house disappears, replaced by a big, white, surprisingly bouncy nothing.
Zac, the protagonist of The Quiet Earth, and the last man on Earth. Or so he believes - although meeting two other survivors is only a comfort for a short while when they start favoring each other's company and leaving him feeling even more alone.
Wolverine leaves the X-Men in The Wolverine, as he wants to be by himself. Also showed signs of being one in the previous films.
Drizzt in The Dark Elf Trilogy runs away from the drow and lives alone in the cavern labyrinth for ten years and he's nearly losing his mind despite having the magical panther. In the end he approaches the svirfnebli who have been fighting the drow for millennia in the hope of them taking him in.
Ayla for a good part of The Valley of Horses from the Earth's Children book series. She gets thrown out of her tribe and has to survive on her own for three years by hunting, gathering and working alone. She notes that if she ever should get incapacitated for a longer while, she would be doomed. She doesn't go mad but she sure feels very lonely and adopts a horse and a lion.
Island of the Blue Dolphins. A Native American girl gets trapped, alone, on the island her people used to inhabit, but then left due to the unscrupulous Aleuts (led by a Russian) that came to visit them and ended up killing off many of their men. Even after she gets off the island, it's revealed that the very American boat that took the natives to the mainland got smashed in a storm and nobody survived, so even afterwards she's "alone".
Mau goes through this in Nation after the Wave wipes out his people. It doesn't last terribly long, though, before other survivors start showing up.
In The Island Keeper, a girl who fled to an island to grieve in solitude loses her canoe in a storm, and has to survive there alone until the lake freezes enough to walk out. While she isn't left isolated as long as other examples, bonus points are awarded because she winds up killing and eating a raccoon and a deer she'd originally thought of as her furry friends.
The short story "Descendant" by Iain M. Banks, from the Culture novella The State of the Art. An injured, shipwrecked soldier must hike a thousand kilometers to reach an outpost with only his damaged spacesuit's AI for company.
Snowman in Oryx and Crake by Margaret Atwood. He is the sole survivor after a virus wipes out the human race and his sanity is definitely debatable.
Something Green by Fredric Brown has a protagonist trapped on an alien world where there is apparently nothing that is colored green. He keeps himself sane by a combination of talking to his alien pet and occasionally firing his Ray Gun, which has a green energy discharge, while he dreams of returning to Earth, apparently the only planet where green things grow. Then he's rescued. It turns out the alien pet is a hallucination. When his rescuer reveals to him that Earth has been destroyed in a war and that he'd have to settle on one of the other, non-green planets, the protagonist has a BSOD and murders his rescuer, then wanders off and completely forgets about the incident and continues to dream of rescue. It's implied that this has happened to him more than once.
I Am Legend has this pretty bad. Robert Neville commits suicide while awaiting execution, after realizing that a single man in a world full of vampires is the true monster.
Allen Steele's Coyote, in which a group of political dissidents escape on an interstellar spaceship, has exactly one passenger pulled out of hibernation en route. He can't go back in. The destination is centuries away. He goes mad for a while, then spends the rest of his life painting murals all over the ship.
Thomas Glavinic's novel Night Work, in which Jonas, a resident of Vienna, wakes up one day to find himself the only person in existence on the whole planet. Even animals and insects are gone. With no one to interact with, he turns on himself.
Men opens with one of the characters engineering the apocalypse, killing everyone else on the planet except him. Naturally, he goes insane. Then becomes sane again. Then goes insane again. Then becomes sane again. Over and over, for fifty thousand years. Then he finds that he wasn't the only one left. There were still babies kept in capsules.
The Shadow King in The City of Dreaming Books would be killed if exposed to sunlight, and does not dare interact with normal people for other reasons. He occasionally watches or listens to them, but spends most of his time in caves deep under the city. He is not the most sane of individuals.
Pi Patel of "Life of Pi" becomes stranded on a lifeboat for 277 days with only a Bengal tiger to keep him company. The only other human being he encounters on the ocean is a similarly insane, cannibalistic Frenchman.
Trapped on Draconica: Invoked. Rana traveled to perhaps the most inhospitable place in Draconica to be alone. Ironically, this is also the only place in the world where one can hear what's going on everywhere in the world.
The creature in "Frankenstein" is the only one of his kind and is too hideous to make friends.
William F. Nolan's story "The Underdweller" has its protagonist as the last man (presumably, at least - we never get a global perspective), but there's something else wandering around which he works hard to avoid.
Roger Zelazny's "Lucifer", whose title is technically correct, but not the way you're thinking. This guy is clearly a bit insane from his isolation.
"All the Time in the World" by Arthur C. Clarke. The main character isn't technically alone, but he's wearing a time-accelerator which isolates him because he percieves everyone else as essentially motionless, and if he turns it off, he's dead.
Live Action TV
Subverted by Galen Tyrol on Battlestar Galactica. Driven half-mad by Humans and Cylons alike, he settles in a dreary, desolate part of the world (implied to be Scotland) so he never has to see another living being ever again.
Earlier in the season, D'Anna does the same thing, deciding to stay on the ruined Earth of the Final Five.
Omega, from the third Doctor's run of Doctor Who, is trapped alone in an antimatter dimension for millennia. He's shown to be pitifully insane by the end of the story.
Sylar experiences this in the final season of Heroes as he gets sealed inside an empty shell of a city inside his own mind by Matt Parkman. In there, he experiences three years of being alone with nothing but his various psychological issues and guilt to deal with. Add in the sudden appearance of his archnemesis Peter to further exacerbate his guilt, it's no wonder that Sylar has completely cracked to the side of good by the end of the series.
Rousseau, LOST. She's been on the island alone for 16 years (until season 4) and is mad as a hatter. There's some chicken-egg debate here, seeing as she's alone because she killed the rest of her team.
Claire has followed in her footsteps, spending about three years alone on the island.
Stargate SG-1 uses this trope in the episode "The Torment of Tantalus," in which Ernest Littlefield has been trapped alone on an alien planet for about 50 years and has gone crazy. He recovers surprisingly quickly.
Holly reanimates Lister's dead bunkmate in hologram form to prevent Lister becoming this, three million years after the presumed extinction of the human race.
Kryten is rescued after being left alone on the Nova 5 for centuries, at least, and has succumbed to delusions and hallucinations. He thinks the dead crew members are still alive and well, despite being skeletons.
Holly, the Red Dwarf's AI, has also -in his own words- "gone a bit peculiar" in the three million years between the death of the crew and the reawakening of Lister. He's certainly succumbed to at least a bit of computer senility.
Lemon Demon's song Saga of You, Confused Destroyer of Planets has a character who, after unintentionally destroying the world, becomes the Aloner for awhile. Though he deals with it better than most:
You moved on, you got old. You got used to the dark and the cold. You withered away into a pile of dust. Completely withered away into a pile of dust.
The song Iter Impius by Pain of Salvation shows us what happens to a man who had cryogenically frozen himself in a process to grant himself immortality. In the intervening time, mankind destroyed itself. After contemplating suicide, he declares himself king of the world and presumably remains there alone for eternity.
I'm never crossing that line Leaving this world behind I will stay on my own On this blood-stained throne.
Porcupine Tree's song "A Smart Kid" is about a young man who finds himself on an Earth completely devoid of all other humans after some man-made disaster. Some aliens show up and he plaintively asks them to "please take me with you." Youtube Link
"Sole Survivor" from Blue Oyster Cult's "Fire of Unknown Origin" is the story of the last man on Earth, "cursed with second sight," who wants to know why he, out of all others, survived. Eventually, extraterrestrials arrive and beckon him to join them, but he chooses to run and hide, remaining the sole human alive on Earth.
The main character of Scanner's Concept AlbumHypertrace was a result of Super Soldier project from WWII, who along with his brethren was deemed too dangerous for service. They were launched into space, and he drifted there for over five years before he was found by the mystic Wizard Force, who turned him into an instrument at building a galaxy-spanning utopia.
Eugene:(to Connie) It was the most horrifying thing I've ever experienced. I've never felt such loneliness or isolation. It was as though I'd become completely separated from... everyone and everything... completely and thoroughly alone. Nonexistent, in a dark void of solitude. I was alone, Connie! Utterly alone, in a burning blackness, and I've had nothing but nightmares since then!
In the Scion roleplaying system, the ultimate power of the 'Justice' domain allows the user to "condemn" someone - assuming he knows for sure that they committed a great crime. Doing so traps them within their own mind, in a prison-cell, completely isolated from anything and everything, for months and years - to their perception. When their "sentence" finally ends, they wake up, with merely a second having passed in the real world. It is implied that most mortals do not get through this with their sanity intact - it is, after all, designed to put the fear of God(s) in magical beings and titanspawn...
The "Rat Man" from Portal. Hiding from GLaDOS in nooks and crannies of the Enrichment Centre, he cracked up and scrawled messages, poems and declarations of love for the Companion Cube on the walls.
You are this in Minecraft's single player mode. It's just you and a world eight times the size of the planet Earth. And lots of hostile and not-so-hostile creatures.
Samus Aran is usually completely alone on whatever planet her mission is on in most of the Metroid games.
*Hyun-ae and *Mute, the two AIs of the Mugunghwa in Analogue: A Hate Story, were like this during the 600 years before you showed up. And then presumably go back to this if you don't take one or both of them with you when you download the ship's logs.
Halo's 343 Guilty Spark was left to oversee Installation 04 all by himself for 100,000 years, with nothing but increasingly infrequent communications from the Monitors on the other six Halo rings for company. After exhausting all his planned experiments and entering longer and longer periods of hibernation, he started ejecting portions of the ring's landscape into space to keep occupied. In the Anniversary terminals, he notes that the Forerunners really ought to have assigned two monitors per ring.
And, as each campaign in Left 4 Dead 2 is connected to the last, and your character still talks as if there were other survivors, in whatever campaign you're playing, this mode gives off the feeling that you were somehow separated from the other survivors between this one and the last one, but since there are also no longer any "normal" zombies anywhere, it suggests that something... else must have happened along the way, too.
The Legend of Dragoon has a number of characters who used to be this trope: Dart, who wandered on a mission alone to find and destroy the Black Monster, refused to take companionship because it was a personal mission and would be incredibly dangerous. Rose, who wandered the world aimlessly and was said Black Monster. Miranda comments that she used to be that way in between the period of her father's death and her adoption by Queen Theresa, wandering the Kashua Glacier all alone.
Proteus drops you on a remote island in the middle of the ocean with no companionship, except for some animals who flee at the sight of you. All you can do is walk around the island and check out the gorgeous scenery.
In Sponge Bob Square Pants, Squidward enters a Time Machine and ends up in a formless limbo. "Finally, a place where I can finally be alone." He lasts all of one minute before screaming to get back home.
In an episode of Justice League, immortal villain Vandal Savage accidentally caused the death of the human race and spent thousands of years alone. Thanks to a time-lost Superman, he's able to prevent these events from happening, and though it caused him to cease to exist, he was ''happy.''
Though considering his immortal nature, one can assume that he vanished because there is another, in-continuity version of him walking around in the now changed time-line. It is mentioned in the episode that no two versions of one person can exist at the same time.
The thing is, Vandal Savage was once a power-mad would-be dictator...until a few millenia of perpetual time-out gave him pause and an opportunity to think about his actions. Spending all that time by himself and with the weight of what got him there mellowed him out considerably and turned him into a civil, well-meaning person. In his case being The Aloner drove him sane.
Strangely enough, came up a couple of times in the 2003 Strawberry Shortcake series. In "The Mystery of Seaberry Shore," Coco Calypso is the sole inhabitant of the eponymous shore (save her pet parrot and two dozen monkeys). When Strawberry is called in to investigate a seaberry robbery, it becomes apparent that Coco, contrary to her song ("With all that I've got, with all that I've found, it's okay by me if there's no one around."), is incredibly lonely. Fortunately for her, the thief was just a girl who lives in a neighboring lagoon who used the seaberries for sustenance before Coco started harvesting them. With the misunderstanding cleared up, the two girls resolve to be friends and share the berries.
In "Strawberry's Big Journey," Strawberry's car breaks down just outside of a small town whose only resident, Banana Candy, takes on all the jobs in the town (claiming she needs them to make ends meet). In order to keep Strawberry and her friends from leaving, she plans to sabotage the car even more, but hearing about their trip, she has a change of heart, fixes the car and confesses to everything. Hearing that she's never left the town before, Strawberry invites her along on their trip, and she seems to have taken up residence in Strawberryland since then.
Demona from Gargoyles fits this trope well; decades of watching her species being driven almost to extinction (often through her own fault, not that she'd admit it), centuries of being hunted down by men in striped masks, and finally alienating the few gargoyles who survived to the 20th century have driven her completely insane.
Demona: The access code is "Alone."
The Family Guy episode "Road To The Multiverse" featured a universe inhabited by only one guy. He did nothing but shout compliments.
Teruo Nakamura, an Imperial Japanese soldier, did not surrender until 1974. He lived by himself on a small island for twenty years.
Lt. Hiroo Onoda held out for 30 years, and only surrendered upon the direct order of his former commanding officer (who luckily survived the war as well). Onoda was not alone the entire time; two of his men surrendered in The Fifties.
People with Insomnia can feel a lot like this if they don't live with people who also have it. Since most are asleep when they're doing their thing, it can seem that the whole world's died in its sleep.
Island of the Blue Dolphins, in Literature, is based on a true story. The tribe lived on an island off the coast of California, and the American Government resettled them. One young woman missed the boat, and no one came back for 18 years. Disease had killed off the few remnants of her tribe, and she ended her days unable to communicate with anyone around her, even after she left the island, because they had no language in common.