Hello Kij,
Smoking may be the culprit for you randomly beating fast heart. Smoke contains nicotine. Nicotine binds to acetylcholine receptors. These receptors are found throughout the brain and body. Nicotine can over stimulate the neuromuscular junction and cause you to shake all over. On the other hand it can stimulate the brain and increase your concentration and attention. It enhances short term memory. But alas, it may cause your heart to become irradic. You are very young so I don't think that you really have a problem. I have no doubt that your panic attacks directly affect your heart as well. Fear releases adrenaline which can cause the heart to race. You might consider taking some GABA. This is an amino acid neuotransmitter that inhibits brain function and helps people calm down.