What you are describing sounds like textbook palpitations. It is completely normal for the heart rate to increase for a lot of reasons, including stress and being startled (via the sympathetic nervous system, or fight-or-flight response). A palpitation is when a person becomes very aware of their heartbeat and perceives it to be abnormal, regardless of whether there is any clinically objective abnormality. They are often associated with anxiety and can lead to a vicious cycle (person is anxious, then notices their heart is beating fast, so they become more anxious, their heart rate increases, etc.).
The silver lining here is that in all likelihood your heart was/is fine. Anxiety has also been proposed as a risk factor for CVD but my understanding is that this is still debated. So don't go thinking your history means you'll definitely have an MI.
None of this is meant to dismiss your experience though. Not three days ago I saw a young, healthy male in the ED who thought he was having a heart attack, and (you guessed it) his EKG and labs were 100% normal. It probably happens a lot more than people realize.
By the way, I'm not saying "don't go to the doctor because that 'heart attack' is all in your head". He absolutely made the right decision by coming in (better safe than sorry).