Gluten Depressive Episode

I ate something with gluten in it the day before yesterday. And oh my goodness, the next day I literally felt like I was losing my mind. I couldn’t even get out of bed because of how depressed and anxious I felt. Dark thoughts, irritability, crying. No matter what, I just couldn’t shake the feeling. Today, I feel more like myself. Nothing compared to yesterday. Can anyone else relate? Does gluten affect you in this way??