Broken Saints: despite all the suffering they have had to go through, each of our "broken" heroes is healed in the end, the men by the power of Shandala's love, Shandala by the power of theirs, and the world is saved.
The two main characters in There she is!! go through a number of tribulations before they get to their happy ending.
In the interactive poem Today I Die, this is used as a metaphor for overcoming depression. The protagonist must swim with a boulder tied to her waist.
Which apparently was a bad thing, because it meant someone's pick for "designated casualty" failed to die horribly.
Summed up spectacularly with The Nostalgia Chick's review of Don Bluth's Thumbelina, where the despairing heroine is surprised to find her prince Cornelius alive and well - "Things are impossible! Things are... oh! Hi dead boyfriend! Thanks for coming along and proving my pessimism wrong and not making me work for that happy ending!"
Counter Monkey: "The Last Ride of Tandem the Spoony." After making it through a horrendously difficult campaign against all odds, Tandem and the only other survivor find themselves with a ship that can cross dimensions, so they first go home to resurrect their friends, and then everyone was last seen sailing away to whatever adventures await them next.
Most of wildbow's Worm is very dark, and it's a very rough ride for the characters, especially the protagonist. But in the end, the world is saved and Taylor survives with a chance to start her life over.
Pact by same author is very rough to main characters too, and even darker than Worm, but its ending somehow even better: Blake turns into a sparrow and spents his time with Green Eyes and Evan; Rose presumably finds sanctuary from Lawyers in the Abyss and starts hurting them through writing and disseminating diabolic texts.
Bagger 288 just wants to find a place where he will be accepted. Unfortunately, Bagger 288 is a ridiculously massive mining machine appropriated dubbed by the internet as "Giant-Assed Saw Thing" that gets chased out of wherever he goes by either the military or protesters. When aliens show up though, he sprouts jet engines and takes the invader down with a Heroic Sacrifice, leaving him damaged to the brink of death and, when he sees all the people cheering for him, happy.
Year 3 (episodes 50-70) of Welcome to Night Vale. After a year of Cecil growing increasingly more depressed, unhappy, and discontent to the point of nearly leaving town, a misunderstanding that nearly cost him a close friendship, and desperately missing Carlos, everything is resolved in one night. Carlos returns to stay, Cecil and Dana's friendship is on the mend, Night Vale has a wonderful new opera house, and Hiram is finally jailed for his crimes (except for Violet.) The only person left unhappy is Kevin.