Sounds like a bad case of GERD or Adic Reflux. Try taking a pinch of baking soda and water and stay away from soda,tea, chocalate and spicy foods. Give it about a week if you can. If it dosent clear up I agree with AnnieBrooke ask your doc for an EKG. Make sure when you go to your doc that your in pain because EKG's can be tricky.
I hope you feel better.
To rule this out and because it's easy to test, try cutting out all caffeine from your diet for about three days. That's from all sources, not just coffee -- tea, cola, Dr. Pepper, Mountain Dew, etc. etc. -- just drink apple juice or something else. See if your heart calms down.
If that's not it, you could ask for an EKG from your doctor.