The premise for Blind shows how much work Naruto and Hinata have to do to end up happy. So...(deep breath). Naruto almost watched his best friend (Hinata) get her eyes gouged out at the age of 3 and has made it his mission in life (second being become Hokage) to getting them back. He, unfortunately, is only a genin and has 4 years to do so or Hinata is either A) branded with the Caged Bird seal or B) disowned and exiled from the clan. To compound the problem he ends up a missing nin with kill-on-sight orders for 3 years.
Hinata has to deal with what's mentioned above but gets put in a coma where she's slowly dying but saved in the nick of time only to hear your best friend has just gone AWOL and the Hyuuga elders are preparing to seal you and time's running out to get your eyes back. Man do they have it rough.
The Rescue Rangers epic fancomic Of Mice And Mayhem puts the characters through about as many hardships as would be possible without betraying the essence of the original show and characters. Against all odds, things work out for the best.
Even with all the madness and downright cruelty in All He Ever Wanted, Austria was at the receiving end of some the worst abuse to the point of being forced to see his beloved Hungary raped by Prussia. He also happens to have one of the better endings compared to the other characters.
The Hill of Swords ending has Shirou, after 5 seperate resummonings, and who knows how many years finally reuniting with Saber in Avalon.
This trope is essentially the center point of the Pony POV Series. While it hasn't ended, even the ends of story arcs tend to lean this way. The two Sixth Rangers especially had to go through Pony Hell to get to the point where they're genuinely happy with their lives. In the case of Fluttercruel, she literallywent through Pony Hell!
The epilogue of Ace Combat: The Equestrian War ends the story on a bright note. Equestria is slowly being rejuvenated by the power of the Elements of Harmony and the magic of Princesses Celestia and Luna to a state before the war. Rainbow Dash becomes a honorary member of the Wonderbolts. Derpy adopts Pipsqueak and Firefly stays in Equestria. She also becomes Rainbow's older twin sister (though they are actually cousins).
Inner Demons: Since the basic premise is Twilight Sparkle being consumed by her inner Darkness and becoming Ax-Crazy and mentally and physically tormenting her former friends as part of her quest to become Equestria's Evil Overlord, it figures that the protagonists have to go through Tartarus (literally, during the Final Battle) to stop their friend and save her from herself. In the end, Twilight is not only saved, but even becomes a Princess alongside Celestia and Luna. Plus, ultimately the only death in the story is Trixie, and even then, her spirit assures Apple Bloom that she died content.
The Immortal Game, being a War Fic, has the Mane Cast going through hell, some of them nearly going crazy and all of them losing their innocence, all to defeat Titan and save their world. In the end, they're successful and like Inner Demons above, Twilight even becomes an alicorn in the process.
The New Retcons have Elizabeth and Anthony from For Better or for Worse go through this, working through an insane mother(in-law), them realizing who they married is not who they thought they married, Elizabeth cheating on Anthony and foisting a bastard son on him, Anthony's undiagnosed Aspberger's, Elizabeth's feelings of inadequacy as a woman but unwillingness to change it, and the death of Elizabeth's mother as well as discovering that Anthony's father killed his mother. They eventually find happiness with them staying together and settling in Vancouver. Especially interesting in that early foreshadowing hinted that they would divorce, when in fact it was her brother and sister-in-law who divorced.
Speaking of said brother, Michael had to do his own happy ending earning: working through the same insane mother (who more directly affected his family since she terrorized them), his workaholic tendencies, two miscarriages, an autistic son, a marriage on the rocks, finding out the man that raised him isn't his biological father, and repressing his bisexuality, culminating in him attempting suicide when his mother died. He ended up divorcing his wife, but he managed to find an inner happiness with a balance of teaching and writing and find new love.
Beth Lestrade in Children of Time has to work very hard, up to and including dying before she can get her happy ending. Even once she marries the man she loves, she has to wait eight more years before she can reunite with him, and thenshe has to be the one to bring him back. Earn Your Happy Ending? More like... Work Your Tail Off And Is It Even Coming In The First Place?
In My Little Borg, all Earth ponies and Pegasus ponies throughout Equestria are assimilated. All the Unicorn ponies have to scrounge through the Borg's library of technology and learn how to build a fully functioning starship in under a week, in order to have any chance of saving them at all — and Twilight is the only one with access to the Borg library.
The official sequel to My Little Dashie (written by a different author) qualifies. Rainbow Dash wakes up in Equestria, only remembering her life with her human father on Earth. She acts reckless with the magic inside her and starts ripping holes in reality just to have her father back. When faced with a choice, her father leaves everything behind just to have Rainbow Dash back (as well as gaining a new friend in Pinkie Pie).