Have you studied about the vagus nerve? Basically its about how if your stomach gets upset, then your mind gets upset, via the vagus nerve.
So i mean, maybe its not that pantrapazole affects your brain chemistry per se, but like a jittery stomach can become a jittery mood.
Lately ive been going in the opposite direction. Like i will lie down after a poop, and my whole abdomen relaxes that then i myself feel calm and consoled. My mother had my guts tied up in constipated knots for like 60 years, so this is a new and very welcome feeling for me.