Massive sympathy for your mental health breakdown, OP, I experienced similar recently and work was a big issue for me.
This jumps out though:
I always feel I have to just say what I want to say to get it out there and deal with the consequences, rather than keep it bottled up at the expense of my own mental health.
Unfortunately at work, we aren't always going to get a lot of thanks. That is to some extent what our pay packet is for.
Have you undergone any treatment or therapy to help you manage this issue?
I ask this because if your way of dealing with less than perfect circumstances is by saying what exactly is on your mind and worrying later about whether it was appropriate for the situation, then dealing with any consequences, I fear that this won't be helping you as you will then fear what those consequences might be.So you might not be helping yourself.
CBT or similar might be helpful in seeing situations and handling them differently, I.e. in this case through the lens of a workplace where the culture isn't perfectbut it isn't personal.
You can then deal with building resilience in yourself to work within that or decide 'this is not for me' and move on. Yes, we can try and orchestrate some changes but I'm not sure looking for thanks for completing work you are paid to do is a battle worth fighting, especially where your mental health is fragile. I'd say better to find a way around this in yourself.
My initial point still stands about asking for more constructive feedback though.