Hey,
I used to get really bad flashbacks like the sort you are describing. I never really did find any particularly good ways of coping with them. I guess one thing would be to try & focus on your surroundings. For example I used to find stroking my soft teddy, feeling my soft dressing gown, feeling pretty much anything in the room would help slightly. I'm not going to lie, it is very hard dealing with this and difficult to bring yourself back. For your friends maybe they could just keep talking to you in a soothing voice, about anything at all. Chances are you won't hear them much anyway so they could talk about total nonsense. Perhaps they could talk to you about good times you've had. Not sure I'm much help with the friends thing as it only ever happened to me once in front of a friend and no matter what he did it always just seemed to make me worse so in the end he just left me alone until I calmed down. Maybe a hug? Although for me this would have been too much and made me tense up even more.
Basically, senses were the one thing that helped me through them. Pay attention to details to remind yourself where you are and that you're not back in that place. Focus on individual scents in the room, specific colours, shapes, just really anything that remind you of the present. Count things, for example all things that are blue in your room.
For the breathing, my counsellor tried teaching me a few relaxation techniques, although it can be quite hard remembering to do them at the time. She said to breath in fully through the nose until your lungs were fully inflated, then slowly, very slowly, breath out through your mouth. It will make you feel a little light headed as your brain isn't used to that much oxygen but it does help to relax you a little bit and hopefully help your breathing get back to normal.
Can't really think of anything else, sorry if I've not been any help and I'm really sorry to hear you're struggling with this at the moment. gentle
if okay