i started out as undiagnosed diabetic for almost 2 years when i had terrible ''everything'' stomach problems, until i was beyond weak, i could barely eat anything, and woke up retching at 7am each day and would drive to the doctor/medical unit for an anti nausea injection, this went on for 2 months before the end; all the while i was blacking out 2-3 times a week during the last nine months. i was undiagnosed because my GP said i was crazy. three days after his final screeching fit that i was crazy, in the waiting room no less, i collapsed at his feet and went into a diabetic coma, at which point from a very far away place i could hear him screaming "wake up, wake, o sh*t what have i done, o god, o no!'' i eventually woke up with totally white hair, the RIp Van Winkle effect, when the twit finally figured out what was wrong and brought me out of it with an injection.
i was then diagnosed with type 2, then found out 9 months into insulin [lantus and humalog] that i was actually a type 1.5 LADA after more specified blood tests.
my stomach problems, also like yours with the heartburn, was eventually diagnosed via a nuclear medicine scan--eat a radioactive breakfast, lie still for 3 hours as they watch what your stomach does. my breakfast sat there and stared back. i was diagnosed with severe diabetic damage ''gastroparesis'' which means my stomach does not empty properly due to minimal muscle function, food just sits there, at one point for 4 days, equalling misery and agony.
i was put on Reglan for a year which then caused nerve damage all over my body as a side effect. I am now taking Cilroton which has no side effects and works quite well, although i still cannot eat very much, and my diet is becoming mostly lacto-ovo vegetarian, no soy products due to the goitrogens which wipe out thyroid hormones [natural or rx], no raw foods, rarely fish or shrimp. i also had an endoscope into my stomach 2x, each time 3 polyps were found, and once removed my stomach felt a lot letter all round, except i was still on the rx to make if function. i put these details in so you can see the time line progression into severe nerve damage...and of course each person is different.
in my opinion you too sound like you have gastroparesis. see if you can get the scan.