The causes of sudden violent beating of the heart in sleep with a sense of near death are fatigue, tachycardia, hyperthyroidism, etc., which can be treated by resting more and using medications such as metoprolol. 1. Excessive fatigue: poor sleep, physical weakness and other causes of physical and mental fatigue, can be felt in a quiet state of the heart beating violently, at this time you need to ensure adequate sleep, rest, avoid overwork. 2. Tachycardia: Tachycardia can be felt when the heart beats violently, and the heart rate can be lowered by taking oral medication such as metoprolol. Adverse effects of metoprolol include fatigue, dizziness, and coldness in the extremities. This drug is contraindicated in patients with symptomatic bradycardia or hypotension and severe peripheral vascular disease with risk of gangrene. 3. Others: arrhythmia, hyperthyroidism, anemia and other patients can lead to rapid heart rate, can find the cause of the disease through electrocardiography, blood tests, and then treat the cause. For example, hyperthyroidism can be treated with oral methylthiouracil. Adverse effects of Methylthiouracil include headache, drug rash, etc. It should be used with caution in pregnant women, and is contraindicated in cases of severe liver injury, severe white blood cell deficiency, and allergy to thioureas. All of the above medications should be used under medical supervision. There are many other causes of sudden violent beating of the heart with a sense of near death in sleep, and it is recommended to consult a doctor in time to clarify the cause of the disease with the help of a doctor, and to carry out targeted treatment and treatment.