How are you feeling now?
It sounds as if you just noticed your increased heart rate... (due to exercise, heat/dehydration possibly)
...which then sparked panic...exacerbating the issue.
Hopefully by now all has calmed down.
Use your coping skills to help you decompress.
"Courage is not the abscence of fear, it is feeling afraid and doing it anyway!"
"Worrying does not empty tomorrow of its troubles...it empties today of its strength."
Corrie Ten Boom
Panic Syndrome recovery due to CBT