Find a GI doc who is a liver specialist. Your symptoms and mine were very much alike. Since I don't drink, no one thought of the liver. By the time they figured it out, I had fourth stage cirrhosis of the liver! ANY time you have pain in your hypochondriac region of the abdomen (just below the ribs) get it figured out!
Liver disease can cause the "brain fog" of which you wrote, as well as day/night reversal and, in my case, getting stupider by the minute!LOL
I almost died from an esophageal varice bleed last year. Thank God I know about black stool! (By the time I could get the providers' attention, I had lost four pints of blood!)
Keep searching. And be careful of herbs. Many of them are tough on the liver as well. (i.e. Scullcap)