Evan’s troubles are compounded when news of the (fake) friendship spreads at school. An ambitious fellow student, Alana, played with the bossy eagerness of a classic overachiever by Kristolyn Lloyd, decides to start a fund in Connor’s name. When Evan is talked into giving a speech at an assembly, as the co-president of what Alana has called the Connor Project, his talk becomes a social media sensation. “Dear Evan Hansen” reflects how such platforms have become both a way of advocating for good and inspiring collective engagement, but it also suggests that viral movements may be mere mirages, and can spiral out of control, potentially doing more damage than good. (The set, by David Korins, is dominated by a series of screens that flash spasmodically with images of posts and tweets when the Connor Project spreads like a wildfire.)

As Evan becomes more entangled in his deceptions, Mr. Platt’s performance grows richer and more wrenching. We see how seductive Evan finds this newfound attention, but also how the knowledge of his duplicity is eating away at him. Even as he basks in a new confidence, he senses — as we do — part of his soul slipping away.

Under the superb direction of the veteran Michael Greif, the show has been subtly refined, its brasher comedy softened, and the performances have grown in delicacy. Rachel Bay Jones is immensely touching as Evan’s mother, who has raised him by herself and grows mournful as she sees her son entering the orbit of another family.

Mr. Park and Ms. Thompson are likewise excellent, indicating how bringing Evan into their lives helps heal their wounds, which, of course, only compounds his guilt. As Zoe, who at first resents the picture of her brother as a lonely martyr — he was nothing but nasty to her — Ms. Dreyfuss gives a sensitive, altogether lovely performance. And as Jared, Evan’s only friend, Will Roland provides nice injections of snarky humor, as he is corralled into helping Evan hide the truth by fabricating a series of emails.

Mr. Paul and Mr. Pasek’s score is woven with unusual seamlessness into Mr. Levenson’s book. And while the majority of the songs are soft-spoken, reflective ballads, with guitar and strings leading the way (there’s no brass in the small orchestra), they are varied and gently melodic, each opening up a window that gives a new perspective on the characters and their predicaments. Particularly memorable is the soaring anthem that closes the first act, and is reprised in the second, “You Will Be Found,” which becomes one of the rallying cries for the social media movement that the death of Connor — and Evan’s speech about him — incites.

Naturally, the story of a teenage suicide and a lonely young man caught up in a web of self-devised deception has its sad aspects. But “Dear Evan Hansen” is anything but a downer; the feelings it stirs are cathartic expressions of a healthy compassion for Evan’s efforts to do good, and his anguish that he may be causing more trouble than he can cure.

The musical is ideal for families looking for something yeastier and more complex than the usual sugary diversions. But then it should also appeal to just about anyone who has ever felt, at some point in life, that he or she was trapped “on the outside looking in,” as one lyric has it. Which is just about everybody with a beating heart.