First, if what you are experiencing has not been diagnosed as panic attacks by a medical practitioner then I'd suggest your first action should be to consult a medical practitioner. Panic attacks are something you can and should get help with.
I am not a medical practitioner and I am not diagnosing you, however, I am going to post some stuff for you to think about. This is a quote from the National Health Service in England.
Everyone experiences feelings of anxiety and panic at certain times. It's a natural response to stressful or dangerous situations.
But for someone with panic disorder, feelings of anxiety, stress and panic occur regularly and at any time, often for no apparent
and the symptoms they list for panic attacks are:
- a racing heartbeat
- feeling faint
- chest pain
- shortness of breath
- hot flushes
- shaky limbs
- a choking sensation
- numbness or pins and needles
- dry mouth
- a need to go to the toilet
- ringing in your ears
- a feeling of dread or a fear of dying
- a churning stomach
- a tingling sensation in your fingers
- feeling like you're not connected to your body
What they don't mention is apologising or surrendering debating points.
I am not belittling your experience in any way and I'm not saying that you aren't having Panic Attacks. But think about the possibility that you are having a natural, and proportionate, response to a stressful situation, as that situation occurs.
If that is what's happening, then you still have the option to look for ways to disguise your response, but you can also consider looking for ways to reduce the stressful situation itself. Either by avoiding it or by trying to change the behaviour of others that that creates your stress.
The two things you have said that this group of friends do is 'gang up on you' and 'exclude you'. In all honesty this does not sound as though they are reacting to you are a part of the friendship group, but rather as an outsider with whom they are in conflict. We, on this site, can't really judge if that is truly the case, because you may be seeing things differently from them, there may be times when you all get on like a house on fire, which you just haven't told us about. But on the basis of what you have shared, as Astralbee and others have said, these people are not friends of yours. They are not supportive of you and they are not inclusive of you.
The most obvious way to reduce the stress you experience in interacting with this group is, as others have said, to cease the interaction. That is good advice and the path I would recommend.
However, if you have determined that you wish to keep up contact with this group but disguise your reaction to the stressful situation, the advice is very similar. If you cannot over-ride the urge to apologise or give in when this is happening, then all you can do is not engage with them while they are ganging up on you, and certainly don't try to engage with them while they are excluding you.
You have said that you cannot always recognise when you are having an attack, so instead focus on recognising the behaviour of theirs which triggers yours.
Focus on recognising when they are starting to 'gang up'.
Is one person disagreeing with you but others agreeing? Probably okay.
Are two or more of them disagreeing with you and the rest neutral or at least not supporting your view? Time to make your excuses and leave.
Have you gone online and tried to make contact and had no response? Do something else, don't try to force people to interact with you or involve you if they don't appear willing.
If they are your friends they might not realise how their behaviour contributes to your reaction, and if they see less of you when they behave that way, they may learn to moderate the behaviour.
But you really do have to ask yourself: if they are trying to exclude you and that causes you to react, and then they tell you that you need to hide that reaction... are they people who want to be around you, and do you want to be around people who reject and don't value you?
It can be scary to feel like you are losing friends, but it really isn't true that any friends are better than none.
Value yourself, get the medical check up, but also recognise that sometimes stress just comes from trying to force things to work that just aren't going to.
Be kind to yourself and think about whether these people are capable of being the kind of friends you want and deserve.
Due to a comment from @PatJ I'm adding this for clarification:
In suggesting you visit a medical practitioner, if you haven't been diagnosed with panic attacks, I am not seeking to pathologise your experience.
That symptom list I included can indicate Panic Disorder, which is something you could get help with if you wanted it. But there are also physical disorders with the same symptoms. I know because I have had one. I still have the disorder, but it is symptomless because of treatment and because I’m being treated it doesn't impinge on my life.