'''Pitiful creature of darkness, what kind of life have you known? God give me courage to show you You Are Not Alone!
The Wicked musical has this theme running as subtext throughout, most obviously in "For Good".
There's a funny exchange in Spamalot in "I'm All Alone" when Arthur sings about how alone he is while Patsy sings about how he's not alone.
Arthur: But I'm alone. Patsy: Oh no, you're not. Arthur: So all alone. Patsy: I'M HERE, YOU TWAT.
This is also a major theme in Children of Eden.
"Not Alone" from A Very Potter Musical and its reprise at the very end of the show. The first time, it's Ginny singing to Harry (which becomes a four part harmony when Ron and Hermione show up) before destroying the sixth Horcrux. The second time is when Quirrell and Voldemort reunite in Azkaban.
Seussical: Both Horton and JoJo are feeling ostracized and lonely near the beginning of the show, then they manage to talk to each other and finally find the friend they've been looking for:
Horton: You called my name and you set me free. One small voice in the universe... JoJo: One true friend in the universe... Both: Who believes in me.
The finale of Songs for a New World is "Hear My Song". The plot of the musical is rightfully sketchy at best, dipping in between time lines as we visit immigrants, wives left behind by soldiers in the Civil War of 1775, a woman who left her life to marry Santa Claus and a man who is the "steam train" of professional basketball. The end song is the most simple. It is the two main females singing to their children, about how they might be scared of what's happened and is going to happen, but they should just "trust in mama's singing, and the gift tomorrow's bringing. Trust it. Don't ask why." Unbelievably heartwarming as they remind them that they're not alone.
At the end of Next to Normal the usually (and understandably) moody Natalie returns home to her father sitting in the dark and crying after he has just come to term with the death of his son and has been left by his wife. She asks if it's just them both now, and he simply says "yes". She proceeds to turn on the lights and tell him "we need some light. First of all, we need some light." We then see them all adjusting to a better life together (at last) after everything has passed.
Diana singing to Natalie in "Maybe (Next to Normal)" could stand for this, too. It works, and they say that they'll "be fine." Even if Diana does eventually leave them to go and live with her own parents for a while.
In Duncan Shiek's adaptation of Spring Awakening, Melchior discovered Wendla's grave (who had died from a botched abortion while Melchior was at reform school, because he got her pregnant and was framed for his best friend Moritz's suicide) and decides his life is no longer worth living. He is visited by Wendla and Moritz, and all three sing "Those You've Known." Melchior ends the musical with renewed hope, since his loved ones are not as far as he once thought.
This is a much more upbeat ending than Wedekind's original play where Mortiz's ghost attempts to convince Melchior that death is better than his miserable life (subverting this trope). Melchior is rescued by The Masked Man (Wedekind's self-insert), who gives him hope for the future and chides the ghost.
RENT: "And when you're dying in America, at the end of the millennium/You're not alone..."
The Eleven O'Clock Number "Is Anybody There?" from 1776 is John Adams declaring his vision and determination to see American independence, but ends with the question wistfully repeated, does anybody see what I see. Then Lyman Hall steps out of the shadows to say "Yes. I do." And changes his vote on the board from no to yes.
For most of her young adulthood, Allison Bechdel from Fun Home Believed she was destined to live a life alone due to her confused sexual feelings and continuous bottling up of them. Her room mate, a Lesbian named Joan teaches Allison that she'll never be alone by being her first sexual encounter and girlfriend. It's heartwarming and Allison sings the song Changing my Major that is about how flipping happy and excited Allison is after she finally learns to let go and accept herself.
The Connor Project in Dear Evan Hansen has spreading this message as its goal, as its founder, the titular Evan Hansen, has social anxiety disorder, leading to him wanting to give other people the message he's been wanting to receive his entire life. The Act 1 finale, You Will Be Found, even has this line repeated, verbatim.
In the Act I Finale of In the Heights, "Blackout", Usnavi rushes to Abuela Claudia's so that she won't have to be alone during the blackout. Subverted that, when he does this, he accidentally leaves Vanessa alone and afraid during the blackout.
Invoked at the end of "It's Quiet Uptown" in Hamilton. Following Philip's death, the Hamiltons are going through tandem Heroic BSODs, and Eliza won't even speak to Alexander following his admission to the Reynolds affair in "The Reynolds Pamphlet". She eventually relents at the end of the song, after Alexander realizes that he was wrong and begs for her forgiveness so that they can process Philip's death together. Her single line of forgiveness ("It's quiet uptown") is a Tear Jerker by itself.
Invoked again in "The World Was Wide Enough", when Burr mentions that "Angelica and Eliza were both by his [Alexander's] side when he died".
And once more in "Who Lives, Who Dies, Who Tells Your Story", when Angelica is buried near Alexander so they can be near each other for all of eternity. Alexander also returns at the end of the song, presumably so that Eliza won't die alone.
In Les MisÚrables, Marius comforts Eponine as she dies in his arms in "Little Fall of Rain". He tries to get medical aid, but she refuses, saying that all she wants is for him to hold her before she dies.
Later subverted in "Empty Chairs at Empty Tables": the revolutionaries are present for Marius's Heroic B.S.O.D., but because they are dead he can't see them, and they can't interact with him.
Also invoked in "Fantine's Death", when Valjean promises to keep Fantine warm while she dies.
As a callback to the above example, Fantine appears to Valjean so that he won't have to die alone. She disappears when Cosette and Marius arrive to invoke this trope, and when he finally passes, she and Eponine reappear to take him to heaven. (In the movie version, Eponine is replaced with the Bishop, who is mentioned to have died in the book but not the show.)