Hey there,
I definitely recommend going to the doctor to rule out any physical issues, and maybe get therapy if it is anxiety.
It might help you to do some breathing exercises on a daily basis and whenever you feel anxious. Take a deep breath for 3 seconds, and then out for 3 seconds. Do this for a minute, or until you have calmed down. This should also help stop you from feeling faint, as that is caused by shallow, fast breathing. Also, it might help you to remember that you have had these episodes before and you survived them; nothing bad is going to happen, it just feels horrible. It will pass so try to remember this.
In general, try to lessen any stress, have a good sleeping pattern, do regular exercise and eat/drink healthily.
Take care