Doctors can test your heart using an ECG. This is a painless test that records the electric signals of your heart rhythm to identify any problems. Then, they might prescribe medication to control your heart rate or go through surgery options if your heart rate is currently life-threatening.