Sweetie, what bloods did you have done in the ER? have you had your thyroid checked? have you been checked for auto immune diseases like ceoliacs or fibromyalgia? What about irritable bowel syndrome(no real testing for this, more based on symptoms).
as for an Endoscopy, your GP should exhaust ALL other avenues before utilising an invasive procedure like that......
I hope you get help sweetie, there is nothing worse than feeling like hell.