The ending of the Maya subplot in Azumanga Daioh. Suffer the animosity of a thousand cats so you can actually own one, happy ending definitely earned.
In Bakuman。, Mashiro and Azuki fulfill their promise and end up together, but it takes 10 years and four manga series by the main characters to get an anime, and Azuki has to prove herself worthy for the role, as well as weather some intense controversy after her relationship with Mashiro is leaked. The two of them also seem to invoke this trope, as Azuki once tells Mashiro that their happiness will be greater if they marry after their dreams come true.
Blue Comet SPT Layzner finished in a rather infamous Gainax Ending thanks to Executive Meddling and an early cancellation that forced the creators to cut the story short. Later, however, the series got a three OAV's to try fixing the problem, and the third and last one fits in this trope to a T: La Résistance wins and Earth is liberated. Roanne turns out to be a Fake Defector instead of The Quisling and returns to his friends. Julia unlocks the Seal of Grados and convinces Ruu-Kain to lay down his hatred. Julia and Ru-Kain then decide to return to the Gradosian homeland to start working for peace and wait for the moment Grados and Earth can live together. Eiji comes back to Earth with Layzner and is reunited with his True Companions, and the last image of the whole series is him and his girlfriend Anna finally having The Big Damn Kiss.
Blue Gender takes place in a very dark, gritty, cynical, cold world after theBlue have taken over the Earth. Human life has lost all of its value and the only thing that matters is defeating the Blue, regardless of any and all cost. Idealistic protagonist Yuji and his Defrosting Ice Queen love interest Marlene have lost everything to the Blue, and almost every friend they make through the course of the series dies, usually in a rather horrifying way. Yuji is even driven to the point of madness in one episode. In the end, however, Yuji's idealism rubs off on Marlene, she pulls him back from the edge, humanity survives (we've been knocked back almost to the stone age, but at least we're not going extinct) and Yuji and Marlene finally get to have a happy life together.
Ao no Fuuin: Over the course of the series, everything that could be shown as a way to end the series early is either destroyed or prolonged due to other, bigger issues needing to be resolved first. This escalates to the point that months go by and the population of Oni rises to entire city blocks being filled with them. Finally, when their population reaches around the 30.000, it's also revealed that Mt Fuji is about to erupt! Deciding that Soko will take responsibility as the leader of the Oni, she wants to go to sleep with them, deep inside Fuji to prevent its eruption, even if this will separate her forever from Akira. But before she can, Hiko bans Soko from the Oni tribe and heads off to lead them herself in their sleep. Fuji's eruption is prevented, the problem of the Oni is dealt with, Akira's company will begin to change the world, so that the Oni will never become a problem again and Akira takes time off, so he can sleep with Soko and rid her of her powers as Soryu, so the two can finally be together as a normal couple.
In Anatolia Story, another work of Shinohara Chie, Yuri is kidnapped from her home and never does end up returning to her family or former boyfriend. She and Kail get involved in issues like wars or a plague, and watch as close friends and family die (by the time the series is over, the death toll includes Tito, Ursula, Rusafa, all of Kail's brothers but Jude, and Kail's father). They also suffer through Yuri miscarrying their baby, as well as every obstacle Nakia puts in the path of their relationship. By the story's end though, Nakia is discredited, Kail and Yuri are able to be wed, Yuri is crowned queen in Nakia's place, they discover that Yuri is pregnant again, and the closing narration tells how they ruled Anatolia well for the rest of their lives. As for their friends and allies who survived, the twins marry Kikuri and have four children with him, Hadi lives with them, Ilbani sees Kail's dream of a better country be realized (which was all Ilbani ever wanted in the series), and Jude and Princess Alexandra are wed.
The manga version of Chrono Crusade fits squarely within this trope. After the end, it's shown that almost all of the characters go on to live happy, normal lives, and those that don't are working towards their own chances to earn a happy ending. Even several of the villains get an Alas, Poor Villain moment at their deaths.
The Kyoto Animation adaptation of CLANNAD had Tomoya die, so that he would be reborn as the Garbage Doll in the Illusionary World. Only then could he be given the opportunity to save Nagisa and by extension, Ushio, when the Girl in the Illusionary World/Ushio sent him back in time, prepared to prevent Nagisa's Death by Childbirth.
Claymore is set in a Dark Fantasy world where Humanity is at the mercy of the Yoma, monsters who can perfectly disguise themselves as Humans and then feed on their guts until entire villages are destroyed, Yoma are also far stronger and faster than Humans so it's almost impossible to fight back. The only things that can individuate and fight the Yoma are the titular Claymores, half-human and half-yomawarrior women created by the shadowy Organization and recruited when they're still children, usually among the many orphans left behind by the Yoma or bought from slavers. The series is famous for its bloody limb-tearing combat, ultra tragic backstories and use of Anyone Can Die, no wonder if similarities have been drawn with another Dark Fantasy Manga, Berserk. And yet, in spite of all that, the Manga ends with a downright and unambiguous happy ending (as opposed to the Anime Gecko Ending that ends where the second half of the story should begin): the Organization who was creating itself the Yoma and the Awakened Beings is destroyed by Miria and the rebellious Claymores, Priscilla is defeated and is finally allowed to die just like what little was left of her Human self wanted, Claire has a chance to talk one last time with her motherly-figure Teresa and then goes on living in peace with a grown-up Raki who took several levels in badass through the years, the remaining Yoma and Awakened Being will be hunted down by Miria and her Claymores and considering that all the more powerful Awakened Beings died during the fight against Priscilla it won't be much of a fight, if the leftovers of the Organization ever attempt to take back the island they can expect to face a whole army of Claymores ready to stop them, even minor characters got something like Cassandra who is able to break free from Priscilla's control and die in honorable duel to Teresa or Ilena being revealed to have actually survived her encounter with Rafaela. It took a hundred years and countless dead Humans and Claymores but it looks like things are finally getting good in the Claymore world (well, mainland excluded).
Surprisingly, Code Geass ends like this. It takes a lot of planning, however, including the protagonist taking over the entire world as an evil dictator, and his best friend, at the protagonist's insistence, publicly assassinating him. OK, the hero's ending wasn't so happy, but he did achieve his goal of breaking the cycle of international conflict and creating a gentler world for his little sister.
One wonders if Nunnally would consider it a happy ending, though...
Indeed, given her reaction to it all it could very well be interpreted as more of a Bittersweet Ending.
A personal one for Jeremiah Gottwald. The person who he greatly admires is killed on his duty, and his status gets stripped from him because of his failure to capture Zero. He almost dies when trying to get his revenge and his life is used for research. He returns powered up from that research to get his revenge again, but this time he's sent to the depths of the ocean. When he learns that Zero is actually the son of Marianne, whom he greatly admires, he understand Zero's reasons, swears loyalty until Lelouch's death, and lives happily in the aftermath.
Obviously it will be a Happy Ending for Lelouch, if he did achieve Complete Immortality (he did activate Geass in his both eyes), walking the peaceful world with C. C.
In Code Geass: Nightmare of Nunnally, Nunnally manages to save the world from Charles' Assimilation Plot, regains her sight and her mobility, and is able to properly say goodbye to Lelouch before he leaves to become Demon King. Despite the difficult work for restoring peace that lies ahead, Nunnally believes that humanity can bring it about.
By the end of Cowboy Bebop, Ed and Ein have abandoned the ship to search for Ed's neglectful father, Jet's ship is wrecked and his leg injured, while Faye discovers that her family history is unsalvageable, and all of her friends old are dying. Meanwhile, Spike is planning a suicidal assault on Vicious' Red Dragon Syndicate. Spike discovers that the woman who abandoned him 3 years prior and sent him down his self-destructive, fatalistic path was still alive. He meets her in the cemetery where they had planned to run away together, and learns that she had abandoned him to avoid getting them both killed by Vicious, who returned from the Titan war furious at being betrayed by both his best friend and his lover. They reignite their plans to run away from the Red Dragon Syndicate, which they were both high-ranking assassins for. This plan lasts about the span of half an episode, 10 minutes, of the series' 570, before she's tragically shot in the back by some mook on a fire escape. Before leaving he tells his friends perhaps the most he's ever told them about himself, and abandons the Bebop for the last time. In thin metaphors he explains to Jet and Faye that, since the disappearance of Julia and the loss of his eye, he's seen his past replayed in the fake eye and reality repeating in his real eye, leaving him uncertain if he is alive or in a bad dream. He tells them that the only way he can validate his love for Julia, and free himself from his dream-like state, is to find out if he was really alive by dying. The only way the ending could have been more depressing, at least on the surface, is if Punch, Judy, the two remaining old men that dug the gates and Rocco's sister were all somehow killed in the climactic battle. There is a happy ending, however, for all of the characters. Ed finds a purpose, and has gained both friends and the potential for finding her father again. Jet resolved some major loose ends in his life and has a real shot at peace. Faye lost her past, but is a strong woman, and has a future ahead of her. Spike, in finding death, discovered that his life was not just a dream, and his love for Julia was genuine.
The Dragon Ball franchise, when taken as a whole is about a young boy who was born a weakling and wants to get stronger. He achieves that and more.
With his timeline in ruins thanks to the androids, Trunks from Dragon Ball Z goes back and meets Goku and his father to warn them of the upcoming threat. Then he manages to take massive levels of badass in the Hyperbolic Time Chamber and also establishes a relationship with his aloof father Vegeta who gives him a sign of respect when he leaves. When he gets back to his timeline and easily destroys The Androids and Cell as well finally restoring peace to his timeline. Then, his happy ending gets overrided during the Goku Black saga of Dragon Ball Super and when we mean overrided, we mean Zamasu successfully killing off everybody he fought so hard to protect, forcing Zen-Oh to appear and destroy his timeline, rendering all his efforts pointless.
Dragon Ball Super's Universal Survival Arc gives us this trope and more: A long and painful fight against the man-mountain known as Jiren ends with Universe 7 on top, Android 17 the Sole Survivor. Given a wish on the Super Dragon Balls, 17 uses it to restore the universes erased by Present and Future Zen-O, fulfilling a Secret Test of Character and restoring Universe 7's good name. Even more, Frieza is resurrected again, this time as thanks for his services, but is warned by Goku that if he pulls anything, he'll be there to squash him.
Used in the Grand Finale of the Eureka Seven anime. When Renton is huddled in a fetal position, believing Eureka is dead and that current events are going to cause The End of the World as We Know It, and begging Holland to beat on him like he used to. Holland simply tells him to stand up and get ready to go to where Eureka is. His way of saying "Don't expect us grown-ups to fix shit for you." If that was too cryptic, Holland pretty much says it when Renton is about to pilot the new Nirvash into battle, telling him to "Go steal away the woman you fell for! You're a man, aren't you?"
The Excel Saga anime ends on a very happy note. Excel and Il Palazzo escape the exploding ACROSS base by going down the trap door together, the closest thing to mutual affectionate gesture the two have ever had; Watanabe escapes with Hyatt and the rest of Daitenzin, technically beating ACROSS; and Pedro and Sandora defeat Tha Man and rescue Pedro's Sexy Wife. While it could be interpreted that everyone died in the explosion, the scenes shown during the credits show everyone alive and back to their old lives. Everyone is also alive during the next episode, but the canocity of that is dubious.
Applies to each major arc in Fairy Tail, but is especially relevant after the Time Skip as it involves Fairy Tail having lost its fame and half of its members, becoming the most laughed-at guild in the region. Participating in the Grand Magic Games is treated as the only way that the guild can win back its status. So it's pretty painful to watch when the two Fairy Tail teams spend the first half of the Games trying to claw their way up from last place, sometimes due other guilds cheating. They manage to fight their way into first place by the end, but when they do finally win the Games, it's only because Sting of Sabertooth lost the will to fight in the last round and surrendered.
Shirou and Saber in the Fate route of Fate/Stay night. Not only does it take Shirou having to go the pain of defending Saber and fighting against the Masters in the Holy Grail Wars to be able to win, but he also has to deal with her returning to her own time period post the Grail's destruction. Furthermore, only in the hard-to-achieve Golden Ending are we given the relief of seeing them meet up again in Avalon, and even then it is implied that they were separated from each other for years.
Fullmetal Alchemist: Ed and Al. Let's remember: Their father, Hohenheim, leaves them and their mother, Trisha, without telling them why (Trisha knew, though). They lose their mother at the tender age of 4-5. The parents of their best friend, Winry, were murdered. They try to bring their mother back from the dead just so they can feel the love they so desperately miss. They fail and come back screwed up. They than fail to save a little girl, Nina, from her insane father, Shou Tucker. Later they lose a close ally, Hughes, and later discover it was partly their fault he was murdered. They than have to deal with the fact they left a family broken. Next, they discover said best friend's parents murderer, Scar, and have to try and stop her from trying to exact revenge. Then their close friend, Ling, is possessed by a homonculus. Then they have to take on Father, the original homunculus on a quest for godhood, who blinds Roy and steals the souls of everyone else in the country (dooming all those people to A Fate Worse Than Death) to fulfill that quest. Next, Al sacrifices himself so Ed could survive and win. Then Ed sacrifices his ability to use Alchemy to bring back Al. In short: wow, they really did deserve that happy family photo at the end of Chapter 108.
Not to mention everyone gets their soul back; Father is defeated; Al is saved (body included); Ling befriends Greed, regains control of his body, and becomes emperor of his home country; and Ed hooks up with Winry and has two kids. It's also implied that Al hooks up with May, and Hohenheim can finally die in peace by Trisha's grave.
The death of Hughes wasn't their fault at all, despite what the boys may think. He was investigating the leader of his own military as a traitor. Even in Real Life, this could easily be seen as leading to treason; it didn't help that the people he was investigating were alchemical constructs with superpowers. It was only a matter of time, really.
Future Diary: It required Yuki to travel back in time to create a new world and defeat Yuno and MurMur to get a happy ending where everyone is alive and rather well, including himself and Yuno, they are then invited by Deus to become gods of the new world and got their chance to see the stars together.
In Gantz, Kei and the other Gantzers have to endure absolute hell throughout the entire series. Whether it's the lowkey alien hunts of the early missions or the massive alien invasion, they're no strangers to death, gore, and destruction. Every character has experienced horrific injury, died at least once, and seen their friends and loved ones die around them in equally brutal fashions. However, after all that, they succeed in saving all of humanity, reuniting with their loved ones, and finally getting to rest. The final panel of the series is Kei collapsing onto Tae's lap, a look of absolute peace on his face, while the surrounding crowd cheers its thanks.
Gosick: In many stories the crowning moment of awesome is when the hero or heroine dies for the other; in the last episodes of Gosick, Victorique and Kujo take the harder path ... and go through hell to live for each other.
Saji Crossroad from Mobile Suit Gundam 00. The poor guy had everyone he loved taken from him, spent most of a season finding out just how much he lost, wound up as the hostage of the very people he thought were responsible for it, then nearly died at the hands of theperson (and alsohisloverival) he was trying to return to multiple times. And only barely succeeds in getting said person ( Louise) back to sanity. If anyone in recent fiction earned the right to a happy ending, it's him.
Mobile Suit Gundam: Iron-Blooded Orphans had the Tekkadan survivors having in peaceful lives despite losing several of their friends including their leader and their organization tarnished in history which forced them to change their identities. At least, they still get in touch with each others considering that they're still working with close colleagues such as the Arbau governement, Kudelia and Yukinojo. Likewise, Kudelia finally achieved her dream for a Martian independence where she became the first chairperson of the Martian Union. Even the antagonists have their happy ending where despite being a crippled war veteran, Gaelio started to form a relationship with Julieta who is going to be the next leader of the newly reformed Gjallarhorn. The only person who didn't get a happy ending is Ride who is guilt for letting Orga die and went a revenge spree by killing Nobliss Gordon.
GUN×SWORD is often praised for having a satisfying ending, but the characters really have to work (or, in some cases, wait) for it. Van gets his revenge, but he is left walking the earth alone again afterwards. Wendy loses her last family member, and she has to wait for at least a few years for Van to wander back into her life. Sadly, not all the good guys get such a happy ending.
Battle Tendency: The vampiric menace is forever halted with the deaths of the Pillar Men and Kars is conscribed to an eternity floating through space unable to die, but Caesar's death will weigh heavily on Joseph for the rest of his life (which he now has to spend with an artificial hand to boot).
Stardust Crusaders: DIO's finally dead for good and Jotaro has become a much more mature young man as a result of his time spent hunting him, but Kakyoin, Avdol, and Iggy all perished along the way (with Kakyoin's parents forever kept in the dark about the nature of their son's demise) and Polnareff is down a few body parts after his battle with Vanilla Ice (specifically the toes on his right foot and a few fingers on his left hand).
Diamond Is Unbreakable: Kira has finally been defeated and Okuyasu was miraculously brought back to life during the climax, but all of Kira's victims (including Shigechi, Reimi, and Kosaku Kawajiri) are still dead and their families will never know what really happened to their loved ones (including Shinobu Kawajiri, despite the fact that her son was instrumental in bringing his killer to justice).
Vento Aureo: Giorno has wrested control of the mafia from Diavolo, thereby ensuring that it will return to its days of helping the weak rather than victimizing them as well as ensuring that Trish can live a full life outside of her father's shadow. However, Abaccio, Narancia, and Bucellati all died ensuring that Giorno could realize his dream, and Diavolo himself is stuck in a Fate Worse than Death for eternity.
Stone Ocean: The Cosmic Retcon enacted by Pucci doesn't turn the universe into a world according to DIO's vision, but instead gives the reincarnated main cast a chance to live happy lives with Emporio as the only one who can truly appreciate their bond. Pucci also pulled a Total Party Wipe on every main character save Emporio, and the universe resetting means that the entire Joestar lineage that we've been following since Part 1 no longer exists, ultimately making their struggle in that universe futile.
Steel Ball Run: Johnny finally gains his father's approval, and while he doesn't win the Steel Ball Run he does prevent Funny Valentine from completing his plan to abuse the Holy Corpse's power and grows more wise and mature as a person (in addition to regaining his ability to walk through use of the Spin). Unfortunately, Diego, Hot Pants, and Gyro Zeppeli all died in the process, and Valentine gets a Cry for the Devil moment given his truly noble intentions that only by chance ran counter to Johnny's goals for the corpse.
Kimi Wa Petto rewards Sumire and Momo with this after they struggle through their feelings, relationships and fight to keep each other in their lives.
Liar Game seems to be heading this way - yes, most of the eponymous game's players are deceitful and desperate to come out of the game with a profit, but Nao's attempts to persuade them to unite against the LGT and share their money to keep everyone out of debt seem to be having some effect. Of course, it's too early to know to what extent this will work...
Lyrical Nanoha does this every season. Mood Whiplash is used like a weapon by the writer, turning some of the darkest, most painful depths of despair into happy endings where almost everyone gets a Good End. A's has the darkest ending of the entire series, and it's merely a Bittersweet Ending. The sole exceptions to this are Precia Testarossa in Season 1 and the overarching conspiracy within the TSAB and Jail Scaglietti in StrikerS. Arguably, this prevents any case of Karma Houdini that even the series' heavily grounded idealism couldn't excuse.
Macross Frontier did this as well, after at least five episodes of utter bleakness, kicked off with a Big Damn Heroes moment from SMS, and culminating in a nuclear disarming-of-giant-robot-via-shanking, one multi-kilometer high robot gut-punching another multi-kilometer robot, songs saving the day, the Vajra turning good and protecting the Frontier fleet, The Rival teaming up to take down the Big Bad, Alto blowing off the Big Bad's head with Michel's sniper rifle, and everybody being happy happy love love on the Vajra home planet. Oh, and Everybody Lives except Michel. Even the character with the terminal disease.
Few happy endings have ever been as hard-earned as that of Mai Hi ME. Starting at the halfway point, what began as a generally light series becomes a battle royale, with character after character falling victim to the HiME Festival. Everyone Mai cares about dies or turns against her — and the Headmaster's plan, which brings them all back, couldn't have worked any other way..
Maison Ikkoku features the Ronin Yusaku Godai's near never-ending attempt to graduate college, get a good job, and marry the woman he worships. In his path are middling grades, general mediocrity, financial woes, Jerkass roommates, a "girlfriend" he's too cowardly to dump honorably, a teen girl who is obsessed with him, and another suitor to the girl of his dreams, who is extraordinarily wealthy and perfect. Does he earn it? Hell yes.
Mars has this in escalating spades, culminating in a white-knuckled, tear-jerking Grand Finale when Rei gets stabbed in the gut by recurring Depraved Bisexual Masao Kirishima, while he's on his way to the party celebrating his marriage to the girlfriend he's been through hell and resolved all of their respective Backstory trauma with. They still get to live happily ever after.
Now and Then, Here and There ends on a bittersweet note, with Lalaru fading so as to bring water back to the world and a very good portion of characters we liked killed off, but given the utterly depressing way the series plays out up until that point, it's clear what sweetness there was to the ending had to be fought for tooth and nail.
In Pandora Hearts, after the world has been saved and he has waited over 100 years for their return, Gilbert is reunited with the reincarnations of Oz and Alice next to Lacie's grave in an afternoon bathed in golden light.
From Pokémon Special, Blue and Silver easily have the most tragic childhoods out of all the main characters. both of them having been kidnapped when they were very little to be enslaved to become a mad man's personal soldiers. It takes a shit ton of effort on both their parts to take down the man responsible for their misery, and arguably even more effort to reunite with their parents after having been separated for over a decade. And when it turns out Silver's dad is Giovanni...
Zorua and Zoroark from Pokémon: Zoroark: Master of Illusions are kidnapped and taken from their home and then separated by the movie's sadistic Big Bad, Grings Kodai. Zorua does manage to escape but is left searching desperately for his mother, who Kodai tricks into believing he still has Zorua and forces to rampage through the city. Both get electrocuted (and NOT the harmless kind normal to Pokemon), beaten, tortured, and put through absolute heck by Kodai. Then when it looks like they're finally about to reunite, Kodai KILLS Zoroark right in front of Zorua! Finally, Celebi restores Zoroark to life to repay Zorua for working his tail off to protect it and is finally reunited with Zorua, they get to witness Kodai get one of the most satisfying Humiliation Congas in history, and are finally returned home. When you see them nuzzling each other as they arrive back home, you know they deserve it.
Princess Tutu ends with the heroine not getting the guy she spent the entire series trying to help and forced to give up the ability to be a girl forever on top of it, but in the end it's still shown that she's happy and with someone that cares for her. In fact, all of the characters are put through a lot of extreme emotional torture throughout the series (to the point that three of them threaten suicide at one point), but they all end up with a happy ending, although for some it's more bittersweet than for others.
Puella Magi Madoka Magica follows this trope to a T. The series itself is full of angst and tragedy, yet the main character manages to make things somewhat right by forcing reality to rewrite itself by preventing Magical Girls from becoming witches with her own hands. As a result, Mami and Kyouko are brought back to life because they never died fighting witches. It came at the cost of her own existence, though she doesn't seem to care about that. It is implied that Madoka takes fallen Magical Girls to some kind of afterlife, which is a much better fate than becoming a witch.
The PSP game makes a more conventionally happy ending possible, but it's one among over a dozen bad endings, only accessible after at least four previous completions of the game (in order to even unlock Homura).
And in Puella Magi Madoka Magica the Movie: Rebellion this is actually deconstructed. Homura earns her own happy ending and creates a world where Madoka and Sayaka are still alive...by stealing a portion of Madoka's power to become the devil itself. It's heavily implied that this state of affairs won't last, and Homura explicitly states that her and Madoka will eventually become enemies.
Among other things, Elie of Rave Master had to fake her death, go into a deep sleep for fifty years, and never really see her friends again in order to stop the ultimate evil.
The ending to the Rurouni Kenshin manga has Kenshin Happily Married to his second wife Kaoru, and having given away his sword. Kaoru has restored her school to a lot of students and is the happy mother of Kenshin's kid Kenji at the same time, Sanosuke is off to see the world, Yahiko is a famous swordsman, and Megumi goes to Aizu to practice medicine while trying to find the rest of her family. The TV anime ends with a Gecko Ending but still a very positive outcome. The OVA on the other hand is a Downer Ending that wasn't even close to the manga's ending: Kenshin and Karou are deathly ill, he ends up amnesiac in China and along with Sano he has to go through Hell and back to return to Japan, Kaoru is barely hanging on thanks to her desire to see Kenshin one last time, and in the end Kenshin goes back home and dies in her arms, only to have her dying soon afterwards. The only bits of hope are these: Yahiko successfully dissuades Kenji from taking up the Hiten-Mitsurugi fighting style and helps him to stop hating his Disappeared Dad. Soon after, Kenji takes off with his girlfriend (who looks like a younger Kaoru) to build a new life away from Tokyo.
Played straight in regards to Fuji, the Gentle Giant of the Juppongatana. Already an Anti-Villain who was mentored by a Smug Snake after being almost killed by scared guards, he's regarded as pretty much a living weapon and not even a human, until Hiko Seijuuro sees through him and treats him like a person in their duel. Later, he cuts a deal with the Meiji government and becomes a rural guard in Hokkaido, finally having a peaceful life with friends and co-workers that see him as the good guy he is.
Terrorist subplot was greatly overblown in anime, while the crazy salarimen antics were invented out of the whole cloth, but the manga had its share of troubles and hardships. They're mostly on the Fee's part, as most Clare's problems in the anime happened to her in the manga, though Tanabe didn't escape them too.
All the happy season finales of Sailor Moon are earned through blood, sweat, and an ocean-full of tears.
3×3 Eyes has perhaps one of the most extreme examples ever: Yakumo Becomes the demonic manservant of Pai, falls in love with her, has Benares manipulate his life and causes Pai to go missing; Yakumo searches for Pai for years and tries to return her memories, only to realize the Pai he found is a Tomato in the Mirror stand-in, so he has to find the real Pai AGAIN; he fails at his plan to destroy the soul of Kayan Wang, and instead brings him Back from the Dead; Yakumo makes a Deal with the Devil to save Pai by being thrown into another dimension where he will constantly die and be revived in a zero-oxygen environment for months on end, all in order to find the last living triclops and bring her back to Earth; that triclops and Pai become part of a Human Sacrifice in a second plan to destroy Kayan Wang, but THAT fails spectacularly and lets Kayan Wang become a god; Yakumo subsequently has his ridiculously-powerful magic stripped from him at the last moment, so that he's just a normal human again, and Kayan Wang proceeds to cause The End of the World as We Know It by absorbing the souls of all but 2-3 dozen humans (which doesn't necessarily preclude the souls of Yakumo's and Pai's loved ones); finally, Yakumo proves that he's perhaps the greatest Determinator in history by STILL managing to pull off a last-second win, reversing the apocalypse after it had already destroyed literally everything in the universe, returning the world and just about everyone to life, including Pai and Yakumo, who are now the only two immortal beings left, allowing them to spend eternity together.
Yakumo and Pai aren't the only two who fit this bill, either. Ryoko and Hahn suffer through just as much crap as the Official Couple do, and still manage to pull off their Happy Ending without a hitch in the end.
So far in the Shakugan no Shana anime at least, almost every battle the good guys have been in were very difficult to win. The bad guys often had some kind of ace up their sleeve, and the good guys had to really fight, or exploit a weakness, in order to win.
The last season of Shakugan No Shana Final was this trope; Yuji Sakai pulls a Face–Heel Turn in order to save the world knowing full well the ramifications of such an act and prepares to Walk the Earth as The Atoner before Shana calls him out and goes with him. FINALLY getting their happy ending in the process.It wasAwesome.
Black and White from Tekkonkinkreet accomplish this, using their implied Psychic Link to stop Black's descent into madness and finally escaping the city to live by the sea. After all the beatings they took and psychological trauma they suffered, it definitely felt like they earned it.
The Five Star Stories: Even though it took billions of years, Amaterasu and Lachesis are reunited and have a daughter, allowing mankind to continue evolution.
After putting the two title characters through hell in the second half of Tiger & Bunny, they both get a happy ending. Kotetsu betters his relationship with his daughter and resolves to not let his declining powers keep him from doing the job he loves. Barnaby gets to see his parents' murderer be brought to justice and finally finds a purpose in life (being Kotetsu's partner in superheroics) besides the quest for vengeance.
In 20th Century Boys, the Big Bad Friend actually manages to realise his plans of dominating the world, and manages to completely screw over the protagonist's attempts to stop him. Twice. This includes him releasing a virus that kills a ridiculous percentage of the world's population, among other things. It's only after 20 years (in story) since the series started that the heroes finally manage to overthrow him and save the world.
In Umi Monogatari, Marin, Kanon, and Urin have to go through a lot while fighting Sedna, including facing their own fears and being corrupted by the darkness. In the end they don't destroy Sedna, but accept her and their sorrow back into their hearts, melting the darkness with light.
And then, the Grand Finale has everyone else earn their ending when they believe Haru makes a Heroic Sacrifice to finally destroy Endless. Everyone (especially poor Elie) has to endure that knowledge for a whole year (with varying degrees of response). The ending's finally earned when they return to the site of the battle exactly one year later...and he reappears, having been sent one year into the future by Star Memory to save his life.
The religious angle is arguable; the novel makes a point of that even though religion is well-meaning by nature, it's unable to help people suffering from serious depression. Misaki's uncle and aunt are deeply religious, and want to help their niece to the best of their abilities, yet are still quite blind to the fact that she's close to being suicidal.