I had the same: Heart pain and difficulty to sleep (blood pressure falls down at night even more than usual due to minoxidil). Went to the Cardiologist, they made an ECG, EEG and told me everything is fine and it is unlikely that's its caused by minoxidil. All these doctors, same as described by other users here seem to be real dumbasses. Tachycardia can occur while you are not in the ECG
After I stopped myself I recovered after 6 weeks alone. You will recover and there will be no damage in the long term, I am quite sure. Just give it some rest and dont start too heavy exercise if you feel heart pain still. Ideally do a 2 week break from sports and stress and then retry