I also had a very big life altering mental health incident very recently, drank A LOT of coffee during and I feel it helped, now I am much more calm, "more correct" despite drinking coffee like before.
Based on this I posit that coffee is used by humans to offset unwanted mentality changes, not a cause of unwanted mentality changes.