It can be very difficult to distinguish if there's a link and so you should see a specialist. If the heart is struggling and the stomach/digestive tract call for extra blood flow, then the heart in turn struggles even more producing confusion if the problem is heart related or stomach.
I was getting the same problem as you everytime I ate something and for a year I was given anti-acid medication. Then I had a heart attack. So, it's worth getting an expert opinion and be examined. Obviously it could just be a stomach issue, but an expert would know from experience and tests.