Situations like this should motivate you to research any mind altering chemicals you have an interest in trying BEFORE you try them. Same goes for your friends. Had your friend known that psilocybin (the active compound in mushrooms) is not toxic, and as far as illegal drugs go, among the safest (in terms of bodily harm, long term affects, overdosing, etc.) he might not have flipped out and convinced himself he was going to die. Knowledge about what a drug does to you (good and bad) can help ease your mind if the effects start to scare you.
I've actually seen this type of thing happen before, and its usually because people dont educate themselves about the drug they are taking. Overdosing on psilocybin is damn near impossible. Yet people who dont know, and take this drug anyways can be overwhelmed by its intensity and convince themselves they crossed that line. If you decide to experiment with this drug or any other, do your research. Find out the dosage, short term and long term effects, etc.
But should you run into that situation again, the best thing you can probably do is just try to reassure your flipped out friend. Let them know that you know your shit (if youve done your research
), hes not going to die, hes in a safe place, the drug will run its course, reality will come back in a couple hours, and everythings gonna be ok.