As a recent recipient of a heart attack, health is more important than flying.
Don't know your age but do not cut back on coffee, instead eliminate all caffeine and sugar. Good on changing diet and getting exercise.
My cardiologist recommended taking Omega-3 fish oil.
As whisperjet suggest, talk to AOPA medical, get a full cardio workup, then work with an AME who knows the info you need before hand. Have the package ready to go with everything you need.
Consult first with your AME and be sure that you will pass the medical before turning anything in to the FAA.
Good luck to you.