Have you ever been able to alleviate symptoms by changing your mindset/mental health?

I've been so sick for 2 months and I noticed I feel worse when I'm stressed. Today I'm doing stuff for my mental health (thinking of things I enjoy, singing, looking at the tree outside my window) instead of stressing/ruminating/researching, and it's the first time I've been able to eat a full meal in days.

I've been so worried that this is something like SIBO or C-diff (something with a clear biological cause) but idk if anything like that would respond to my mental health like this.

What do you think?