Panic and rapid heartbeat caused by different causes can be treated in different ways. If the heart discomfort is caused by strenuous exercise, drinking strong tea, coffee, alcohol, etc., you need to rest in bed and reduce the intake of stimulating alcohol and drinks. If it is atrial fibrillation, you need to do anti-arrhythmic treatment or take aspirin to ensure that your heartbeat is within the normal range. If the panic and rapid heartbeat are caused by anemia and infection, you can first treat the anemia with oral blood supplements and take anti-infective drugs for infection. In case of paroxysmal tachycardia, an electrocardiogram should be done first to confirm the diagnosis and then see if medication or surgery is needed. If it is sinus tachycardia, you can take medications such as metoprolol. If the tachycardia is caused by myocardial ischemia, you can take medications to improve myocardial ischemia, such as trimetazidine tablets.