Is the thumping heartbeat a single beat, or many recurring "heavy" beats in succession?
Also, which comes first - the almost fainting, or the heavy beat(s).
Without question, If you're worried you should see a doctor.
Does the near fainting occur before or after you feel the thumping? If it is after, you could be scaring yourself into thinking you are about to faint. Same thing with the shortness of breath. Definitely go to the doc and get checked out. Once you are given the all clear, you can just let it thump. Easier said than done! I hope everything works out.
Have you seen your doctor? I think that would be the best place to start. The shortness of breath may be a concern combined with the thumping.