The condition you are talking about is known as HEARTBURN/ GASTROESOPHAGEAL REFLUX DISEASE
. It has nothing to do with burning of heart. this is just for name sake. Actual disease is about reflex of gastric juices (Mostly HCL), into the esophagus
(Food Pipe) because of either common vomitting or sometimes because of defective mechanism of VALVES, which guide the one way passage of food from food pipe into the stomach.
As gasrtic juices are acidic, having pH close to 2 or 3, which if comes into direct contact with soft mucosa of food pipe, then it can cause injury
to that mucosa, which is felt like sometimes as burning sensation in the chest close to heart.
that's why it is known as heart burn. THERE IS ABSOLUTELY NOTHING FROM STOMACH THAT CAN HAVE A PASSAGE TO HEART WHICH CAN BURN IT.