Wicked. Even though the protagonist survives, and Glinda banishes both Morrible and the Wizard, Glinda is still left alone believing every close friend she's ever had to be dead. Fiyero, now cursed as a scarecrow, and Elphaba might have survived but can never return to Oz. Glinda and Elphaba come to terms with the irreversibility of fate and circumstances and ultimately realize that the fact that they met and changed each other was what really mattered.
In the musical Spring Awakening, Melchoir finds that his pregnant friend, Wendla, is dead. Racked with guilt, he attempts to commit suicide only for her ghost, and his friend's ghost, to appear and convince him to live.
Even more creepy, in the original play. Mortz's ghost finds that he rest with a pride and a smile on his face, while Melchior, remorseful of his part in Wendla's death, lives on under the workds of the Masked Stranger.
Gilbert and Sullivan's Yeomen of the Guard ends with one happy couple and poor Jack Point realizing his love is well and truly lost to him.
1776 ends with the Continental Congress signing the Declaration of Independence-with the knowledge that they have a long, arduous war that they have little chance of winning to look forward to, considering their army is a shambles and the British Navy was the greatest in the world. Hindsight tells us they'll win eventually (since it is based of history), but they don't know that.