Hallo Swan. It sounds as though the Origen of your problem lies in the Gastro-intestinal tract, as the duration of your symptoms would not suggest it has anything to do with your heart. The most probable cause due to the fluctuating nature of your symptoms, is a diaphragm hernia
, but can also just be acid related (so called reflux disease.) . Because your stomach is enervated by the Vagus nerve
that pain can refer to your heart and sides, even into the arm and jaw. It will be best to see a surgeon whom can diagnose this problem and more importantly treat it for you.