Doctors may use an electrocardiogram to diagnose a mini heart attack and use treatments such as aspirin, anticoagulant medication, or beta-blockers.