Osmosis Jones has Ozzie spending most of the movie struggling to stop a deadly virus named Thrax from killing Frank, the man in whose body Ozzie lives. It isn't until the very end, when Frank is half-dead, do things turn around.
In Scooby-Doo! Mystery Incorporated: during the Grand Finale, after the gang destroys the evil Eldritch Abomination, they find that it was ERASED fromhistory entirely! This creates a new timeline where pretty much everyone's lives are better: everyone who was consumed by the entity (or died in some other manner) is alive and well, Sheriff Stone and Mayor Nettles are married with 4 children (3 boys and 1 girl), Danny Darrow had a better life and is now head of Darrow University, Shaggy is an award-winning chef respected by his parents, Ricky Owens is thin and married to Cassidy, and his company, Creationex, instead of being a polluting nightmare, is an environmentally friendly business, with a sane Pericles as a spokes-parrot, Fred grew up with his birth parents (who help deliver babies and have never touch a trap), Daphne's parents are OK with her and Fred's relationship, and Velma and Hot Dog Water have won many academic awards together. It initially seems subverted for the gang themselves, since without the entity's influence, the mysteries they solved during the series NEVER HAPPENED, and they're mystery solvers in a place without mysteries... until they receive a disc from the new "Mr. E", who also has Ripple-Effect-Proof Memory, and after his revelation that timeline switches have happened before, they realize that there's a whole WORLD of mysteries out there, and set out to solve them!
Moral Orel ends in this way, where despite the fact that the main character lives in a Crapsack World of hypocrisy and zealotry and having one of the worst father figures imaginable, Orel ends up growing up to raise a genuinely happy family, with his brothers becoming a fireman and a policeman, though his parents are seemingly doomed forever to misery and hatred. That and throughout the final season it's been shown that there's a few residents of Moralton that have a chance at happiness.
The sequel series> Aang and Katara have had kids, some of whom have kids of their own; Zuko has allowed his daughter to take the postion of Fire Lord, she has a son who is an avid fire bender, and Toph's daughter is head of the police force that uses her signature metal-beinding style.
Legend of Korra's first season. Korra goes through huge amounts of Break the Haughty, culminating in Amon's removal of her bending, after which she breaks down. Then Aang shows up, telling her that she's finally connected with her spiritual side, and gives her both the knowledge of Energybending and her bending back. The season ends with her giving Lin her bending back, showing that all that Amon damaged can be repaired. On a smaller scale, the Mako/Korra/Asami Love Triangle: it's messy, long, and complicated but it ends with Mako and Korra together and no hurt feelings.
In "Chef Aid", the boys hold a benefit concert for Chef after he is sentenced to jail due to bad legal judgement over the song "Stinky Britches". However, the executive, who claims he is "above the law", tries to sabotage the concert and nearly succeeds, but Johnnie Cochran saves the day in the end.
Stan gets to do this in "Asspen", whether he wants to or not.
Cartman does this in "Red Sleigh Down" to get on Santa's Nice List.
Everybody in South Park does this in "Red Man's Greed". Even after becoming homeless and contracting SARS, Stan helps them earn it with Sprite, soup and Dayquil.
After Wendy leaves Stan in season 7, we had to wait until season 11 for this trope to work its magic again. The two of them reunite after exposing a fixed list on who the cutest boy in school is.
Kyle earns his happy ending in "It's Christmas In Canada". After having Ike taken away by his birth parents, the boys go all the way to Canada to get the prime minister to change his mind. The prime minister turns out to be Saddam Hussein, who made up those absurd laws for the hell of it, the Canadians beat the crap out of him, and Kyle is finally reunited with his little brother.
"Quest For Ratings": The boys' news show is getting low ratings because everyone prefers to watch Craig's stupid show with the dogs wearing hats. The reason? The viewers liked it because they were on cough syrup.
An odd variation in "The Losing Edge". The kids are fed up with playing baseball and want to spend summer doing something else. Stan's dad Randy manages to cause their team to lose inadvertently, earning the kids their happy ending.
After being brutally injured by Cartman over the fate of Family Guy, Kyle earns another happy ending in "Cartoon Wars", both things happening in part 1 and 2 respectively.
The boys let themselves go and spend 2 months on the computer to earn another happy ending in "Make Love, Not Warcraft".
The boys, Ike, and every last Canadian earn theirs in "Canada On Strike".
Mr. Garrison earns his in "Eek! A Penis!".
"Margaritaville": Kyle earns everyone their happy ending. However, Barack Obama was praised for it instead, much to Kyle's dismay.
One-shot character Kip Drordy earns his happy ending in "You Have 0 Friends", thanks to Stan.
Kyle yet again earns his happy ending in "Crack Baby Athletic Association", with help from Slash of Guns N' Roses fame.
The ultimate South Park expression of this trope may well be the "Imaginationland" storyline. An apocalyptic war between good and evil in the subconscious of humanity! Beloved characters die gruesomely! Kurt Russell gets raped by forest animals! But in the end, it is Butters of all people who pulls victory from the jaws of defeat and saves the day, insuring everyone gets a happy ending. Even Al Gore is vindicated about the Man-Bear-Pig!
Lilo & Stitch: The Series: Ever since Angel's capture by Gantu, fans were not happy about this ending at all and have made fanfics about how Angel came back. Eventually, there was a canon way in the form of the series finale, "Snafu". The plot: Lilo was organizing her experiment log when she and Stitch suddenly remember Angel, who Lilo promised that they will get back, but she doesn't know where Angel is, so Nosey, who has escaped an episode earlier thanks to Woops, tells them the location. While Lilo and Stitch were devising a plan, Lilo discovers an experiment pod labeled "120", which causes Jumba to explain that 120 shouldn't be hydrated, which Pleakley does accidentally. As the title suggests, Experiment 120 ruins anybody's plans, the protagonists', in particular. However, when Stitch and Angel meet again, The Power of Love saves the day, as well as the several experiments Gantu captured over the course of the show's run.
After over ten years of various defeats, setbacks and humiliations from their attempts to earn respect from their peers, Ed, Edd n Eddy ends with the eponymous characters (Eddy in particular had) finally getting their wish in Big Picture Show, being actually liked and respected by the neighborhood kids who had once previously detested them.
Cinderella does this in Twist in Time. After he stepmother turns back the clock and enchants the prince to love Anastasia, Cinderella sets off to the palace and tries to first jog the prince's memory and then steal the magic wand from her stepmother. When that fails and the prince falls for Cinderella anyway, the stepmother makes Anastasia Cinderella's double while sending Cindy to be trapped in a pumpkin carriage that is to be driven off of a cliff on a mountain. Cinderella proceeds to escape, jump onto a horse, and ride all the way back to the castle to stop the wedding.
Could be considered to apply to Fry and Leela in Futurama.
As well as Zoidberg. After being a Butt Monkey for the whole series, he finally finds a woman who loves him, even with his terrible smell! Even better, since it's the last season, there's no Reset Button!
With so many downer endings for the DCAUBatman, the Fully Absorbed Finale for Batman Beyond, "Epilogue", was about as happy an ending as Batman can ever expect but boy, did Bruce, Terry, and the audience have to go through a lot to get it. Terry finds out that Bruce is his biological father and is pissed about it. For most of the episode he's angry and bitter about Bruce, Batman, and fate. But with the help of Amanda Waller (again It Makes Sense in Context), he realizes that he has control over his own life and that he isn't Bruce even if he may be his son. So in the end, Terry is determined to live a happy life and be Batman at the same time while Bruce is left with a protégé he trusts to carry on the/his fight after he's gone and a family he's always been looking for.
The Happily Ever After Fairy Tales For Every Child episode, "The Frog Princess," has Prince Gavin, who just won his father's kingdom thanks to the Lila, a frog he was forced to marry, and should be happy, but he can't get over his wife being, well, a frog. So she goes back to the swamp, and Gavin realizes that he actually loves her. But in order to find her again, he ends up swimming the longest lake, climbing the highest mountain, and running as far as he possibly can.
The Animaniacs movie Wakko's Wish gives all the characters (except the Mime and the movie's Big Bad) a well deserved happy ending. Sure, some had it kind of easy in their series, if not a little strange, but some of the series Woobies, particularly Rita, Runt, and Buttons, finally get their happy endings. And in the movie, everyone worked hard to try and get their own happy ending, everyone ultimately obtaining it.
The eponymous character from Danny Phantom certainly qualifies. After three seasons of being despised by everyone as a human and a ghost, hunted down, and having a just plain miserable life, in the Grand Finale, it all pays off: He becomes known as a hero to the entire planet, his secret is let out to everyone including his parents thus leading to perhaps a more popular reputation and perhaps becoming closer to his family, and to top it all off, he finally hooks up with his female friend which has been hinted at since the series began. It definitely seems that his future is brighter than it was originallyintended.
Balto earns his big time. He started the movie the hated outcast who was constantly being chased away from the one he loved, with the movie's JerkassBig Bad trying to ruin his life, and being unable to accept himself as a dog or a wolf. He has to go on an epic adventure through a blizzard, facing horrible danger at every single turn, and ultimately getting the tar beaten out of him by Steele, but in the end, he saves the entire town and is honored as a hero. On top of that, he finally accepts what he is and manages to get the love of his life. Sure, the next film shows there are some dogs who still make fun of him for his wolf half, but his life is a lot happier than it was.
In the My Little Pony: Friendship Is Magic two-parter "The Return Of Harmony", the Mane Cast has to do this, especially Twilight Sparkle. Discordbreaks and Mind Rapes all of them (except Twilight), turns their homeland into a chaotic World Gone Mad (centered in their hometown of Ponyville, no less), and Twilight crosses the Despair Event Horizon when the Elements Of Harmony won't work because of the previously mentioned events. She was getting ready to pack up and leave before Princess Celestia sends her all the letters she'd sent to her on friendship the past season. She then has to literally fight her friends to let her use her magic to remind them of all the good times they've shared before they can finally use the Elements Of Harmony to vanquish Discord. They saved all of Equestria and restored their friendship but it was far from easy!
"A Canterlot Wedding" is another prime example of this. By the time Celestia finally gets around to declaring the real bride and groom formally married, there's no doubt that both of them have earned it after what they've been through. And of course Twilight Sparkle, after having her suspicions blown off by everypony and for a while seeming to lose her friends, her mentor, and her big brother over it only to have the main villain promptly banish her underground as soon as everypony else has left...ultimately gets them all back and gains a new Cool Big Sis in the bargain.
DuckTales never fits this more than with its five-part "Super Ducktales" episode. Fenton Crackshell gets recruited as Scrooge's new accountant after the Beagle Boys pull a dirty trick that forces him to move his Money Bin, and Fenton welcomes the chance to prove himself as someone. Unfortunately, the poor guy keeps screwing up worse by the minute. Things seemingly get better when he gets a hold of the Gizmoduck suit and gets to turn his fortunes around as a celebrated hero, but then he gets taken over and gets turned into an unwilling criminal that becomes public enemy number one that steals Scrooge's fortune in events that leave ultimately him penniless, homeless, and in prison. Even after Gizmoduck is freed from control and breaks Scrooge out, some Giant Space Robots From Nowhere steal the Money Bin. The two then head into space to finally recover it and Fenton manages to defeat the robots' leader without the use of the Gizmoduck suit, and by the time they return to Earth the Money Bin's not only placed back in its original location but Scrooge, having discovered the Fenton's Secret Identity, gratefully rehires him under both guises. And then to top it all off, all this new confidence leads Fenton to finally ask his long-time crush out.
Fenton still has his tendency to screw up though. And unfortunately, Gandra Dee turns out to be an ungrateful shallow bitch. Fenton even has to apologize to her once, when she had refused to help him earlier in the episode!
Transformers Prime ends with the Autobots definitively defeating Decepticons, saving the Earth, and restoring Cybertron to its former glory after eons of struggle and loss.
Cameron's ending in the Total Drama Revenge of the Island finale, not only does he say he dosen't need his bubble anymore, but also he shares the prize money to his friends as well as his enemies, making everyone happy.