It can be a good antidepressant, but definitely won't help anxiety. I've recently quit coffee as well and it's done wonders for my anxiety.
https://www.goodrx.com/blog/does-coffee-caffeine-cause-anxie...
This abstract says that depression risk decreased by ~8%, but I still think this is an amazing finding.
I also wish I was scientifically literate enough to understand how good the study is :P
[1] https://journals.sagepub.com/doi/abs/10.1177/000486741560313...