Look Outside Ending Spoilers
(This game is still eating my brain, so here's another long textpost)
The Flawed Ritual ending is fairly ambiguous, as we don't know the exact mechanics of how mutation works, and that makes it very interesting to me. From the way the astronomers seem to mutate when they become afraid due to the wrong materials, and how you manage to keep your shit together in the Denial ending, it does seem like the mental state of the afflicted does play a part in their mental health post-transformation.
To my mind, this means that running into the bathroom to have a panic attack by himself was the worst possible thing Sam could have done. I believe this for two reasons:
Those already mutated, especially someone as collected as Helen, could have possibly kept him grounded to some degree. It was never going to be pleasant, but there's some possibility of keeping his personality intact if not surviving without a freshly traumatized mind. From there, he could get his bearings and the group could start working out their next moves for once the Visitor is gone. Running into the bathroom to stare into the mirror (which would visually spur on his freakout) was maybe the worst choice he could have made. This isn't to call Sam dumb, the poor guy is understandably freaking out and I don't know that I would do much better.
Secondly, more practically speaking - He's in the bathroom, and he's getting bigger. We have no idea where the mutation will actually end. What if he can't get out of the bathroom? What if he gets so big that his form has to either conform to the shape of the room or burst out through the walls? If you're already mutating, the best thing to do might just be to stay outside. I haven't seen anything that would suggest that people who've already seen the Visitor can be mutated further.
All that said, I do genuinely think that the other characters, once they get over their shock, would bang on the door to try and get him out and situated. At the very least, I believe that some of them would try and calm him down through the door. I don't have any reason to think that Sam transforming is necessarily a bad ending, plenty of people got mutated and came out of it really chill or even more helpful than they were before (the plumbing/water supply guy is a real MVP in that regard). Given time to adjust and depending on how you played your Sam, he might end up being a force for good in the same way he did in the Denial ending, just smaller.
Beyond my attempts to puzzle out the hows and whatnot, I also just think it would be very nice and thematic to have your strange and changed friends repay your kindness to them. You could have attacked or avoided a lot of them due to how they look or act, but instead you decided to take them in, feed them and befriend them. It would be really sweet if they decided to return the favor by helping you adjust to your new form.