Panic attacks are never easy and from personal experiences, the situation definitely alters the severity of the attack. In public, myself (and others I know) have experienced a great deal of shame and embarrassment from panic attacks. However, we ourselves have NO reason to feel embarrassed. Mental health problems are a stigma often overlooked by those who do not understand, and in the future, I hope that others will become more educated into the world of anxiety. Anyways, when dealing with a panic attack in public I will always get a warning (a feeling/physical reaction etc). When I get this warning, I will immediately remove myself from the situation I am in and take myself somewhere quiet and alone. If I have to leave a room or leave company, I will politely say, "if you can just excuse me for a couple minutes", and step outside. Once alone I can concentrate on myself and my breathing, and will often close my eyes and listen to music to distract myself. After doing so, if I feel ready I will return myself to the situation. If not, I try not to dwell on the past or think of what others are thinking, but promptly take myself home where I can re-focus my mind.
When I'm with friends I trust, I am very open, though I know not everyone will feel comfortable doing this. Sometimes I will say, "just give me a few minutes, I don't feel good" or "I feel very agitated". Giving my friends warning is enough and they know what to do from there. I find that when in a calm state of mind, it helps to tell your friends what works and doesn't work for you. I.e. they shouldn't be offended if you leave the room, or if you cry, let them know that you don't want to be held, only reassured. Allowing your friends to be educating in offering the right support will make them feel more helpful and put your mind at ease that they're not judging you or offering too much support.
Finally, when alone, my attacks are usually more severe as I do not have the thoughts of being in public or around others. I always try to deal with my panic attacks when I experience the initial triggers, as opposed to mid full-blown panic attack. When I feel the triggers coming, I usually take my jumper etc off to cool myself down, get a class of water and put on some relaxing music. If I can, I will try some deep breathing exercises. I also have colouring books and jigsaw puzzles which work great for me as it's a soothing source of distraction and relaxation, and occupies my mind so much that the attack gradually reduces.
Panic attacks are never easy but I hope this has provided some guidance into managing them.