I think nearly everyone of this forum has experienced what you are going through. Is this the first time you have gone through anxiety / panic attacks? Don't be afraid to go the ER if you need to. You can receive treatment there until you have the chance to see your doctor. Sometimes these attacks pop up out of nowhere, and go away by themselves. Everybody feels anxious and panicky form time to time. If they persist, or you start to constant worry about them, you might have an anxiety disorder. Your doctor will be able to properly diagnose and treat you. He/she might first want to rule out physiological causes of the anxiety / panic (like a thyroid issue or vitamin / mineral deficiency). You can then discuss what treatment options would be best for you. These might include exercise, talk therapy, relaxation techniques, medication or a combination of these.
All the best..