Also, I can say that the more I’ve opened up at work, the more my career has improved, from finding better-fitting positions to finding interesting and meaningful work within those positions, to enjoying my time at work more, to getting paid more. It’s really worth it. You may want (or may not) want to start by seeing a therapist.
I saw a talk with April Wensel many years ago that made me reevaluate the "soft" skills and how getting better at those produce better code _and_ more personal happiness. I think opening up is a good thing but it's also hard scary work sometimes. It's much easier to be cynical and detached. That lets you blame others for yourself feeling miserable (eg. many disillusioned commenters in this thread)
Also, I can say that the more I’ve opened up at work, the more my career has improved, from finding better-fitting positions to finding interesting and meaningful work within those positions, to enjoying my time at work more, to getting paid more. It’s really worth it. You may want (or may not) want to start by seeing a therapist.