There could be a combination of things that causes you to be so unwell.
Would doctor consider some type of meds to help you sleep? Something non addictive?
Are you currently sober? Various substances such as alcohol and drugs (current or past use) would affect your ability to eat, sleep and remember things.
Have you done full physical? Blood test?
Do you have any diagnosis and are you on any meds for any of it?
Have you considered going inpatient? What does your doctor suggest?