Any heart arrythmia (irregular heart beats) should be checked out. Preferably immediately to the incident. That would have been the time to head to the nearest ER. Sometimes you don't get second chances!! There can be several reasons why this happened, but no doubt it was probably electrical in the conduction mechanism. Sometimes caffeine or cough or cold medicines can trigger things like this. Things that have stimulants, some energy drinks, and it could have been an anxiety attack, but it could be something in your heart that caused the anxiety. The chest pain is definitely a red flag, shortness of breath, numbness, dizziness, etc. all symptoms of a heart "attack", just because you are in your 30's, you are not immune. If your husband wasn't there to get you steered off the road, you could have had an accident. Many accidents happen as a result of a "medical condition" while driving, but they often don't live to tell the story.
Atrial fibrillation can cause these symptoms and sometimes yoga excercises can slow the heart down, (of course, driving down the road, you can't do that).
An EKG can often determine if you have had a heart attack, but you might need some further testing and wear a monitor for a couple of days to see what you heart is doing. Sometimes an electrolyte imbalance, like low or high potassium can trigger these episodes. Sometimes a virus can cause problems and also bacterial infections too.
Do get checked out, hopefully this is an isolated incident, but one must take this as a warning that something isn't right.