It's not quite the same, but when I had a job occ health acted as a "go between" for me and my manager. When I went through a rubbish patch it enabled me to drop my hours, and then after ~6weeks of sick facilitate a phased return (started on two short days and worked up to 4 normal days) as well as my manager being aware of my difficulties and able to offer me support if I was struggling at work/needed a break etc. Without that support I would probably have ended up quitting. It was only my manager that had to know what was going on. A couple of my more perceptive colleagues worked it out, but really great about it and just wanted to support me. I was lucky that occ health were really good with my mh issues, I would imagine that someone who works with those with mh issues and can liaise with employers would be doing a more specialised version of that role.
I know you like to keep mh stuff "under the covers", but realistically in the past this hasn't worked for you, and means that as soon as you run into difficulties so as not to have to talk to work you quit. Surely its worth trying a different tactic, and being more open with people, both now and if things start getting tricky so that you can be supported to keep your job (even if you need to have time off sick). It might make your life a bit more consistent if when you hit a rocky patch you were able to take however long you needed off sick but were then able to return to the same job, without the whole job seeking/worrying about telling people about mh issues etc??
Also like howling said....mh issues are nothing to be ashamed of. You didn't choose to be unwell, just like people dont choose to get cancer. You deserve the help and support to get you back to/keep you at work hun