Every time I cough it feels like a mini heart attack, small pain in the heart, less than a second, than goes away. 2 days now. Pretty healthy 35yro.

Pleuritic chest pain. Pain from cough can be sharp. If persists see a doctor to order x-ray and get work up. Meanwhile take some Motrin and robatussin.
Do U have heartburn? There is a muscle where the stomach meets the esophagus called the cardiac sphincter. This muscle can get irritated & form small tears following things like heartburn (acid reflux), throwing up/dry heaving, heavy alcohol drinking or an intense cough. The brain isn't great at sorting out the location of pain in the chest, so pain from this area (tugged when you cough) may feel like from the heart.
Check with your doc. Probably viral but may be something else such as a collapsed lung or miscellaneous. Check with your doc.