This. You can find hundreds if not thousand of testemonies in the keto space where their depresion completely disspeared after between 1 to 6 months on keto or at least their needs to meds drasticaly reduced and their symptoms improved.
I'm not saying keto can't help with psychological problems, but we should first acknowledge the other multiple, known causative, elephants in the room.
Keto cuts out things that are bad for the microbiome, but the things it keeps are bad (red meat -> excessive protein and TMAO), and it doesn't feed the bacteria enough (fiber, etc).
Also, keto dieting advice is pretty universal but different people have very different microbiomes, lactose tolerance, etc.