Ah, so you're a similar age to me.
I'm sorry to hear that you were in a psychiatric unit in your 20s. That must have been very difficult. I had a four-year long clinical depression at that age and didn't work during that time, but never sought help. Slowly got back to a kind of normality.
There's an academic article called "When my autism broke" by Moseley et al, which is what "alerted" me to the fact that I'm likely neurodivergent. It outlines how the strategies that autistic women adopt in earlier life, consciously or otherwise, often become untenable around menopause, hence the autism "breaks" and can no longer carry you through the days. Effectively you no longer have the energy required to continue masking. I'd already left my job a few years before realising the ND connection to the problems I was having, unfortunately, otherwise perhaps I could have carried on somehow.
It's interesting how you describe your agoraphobia. I've never thought of myself as having that, but a lot of what you mention sounds familiar. For around 15 years in my 20s/30s I never went anywhere further than a couple of towns 20 miles away. I could afford to but just "couldn't" do it, if that makes sense. I was okay going on buses but totally avoided trains and have never driven or had access to a car. It wasn't so much being on public transport that worried me, it was all the kerfuffle around it: queuing to buy tickets, worrying about missing connections etc. Possibly that's a case of having trouble with "autistic transitioning". Again very slowly that got better and now I'm okay going on trips to Europe on my own (don't have a partner), though I still worry about things going wrong. It's a vast improvement on the days when I was so anxious I felt as if I was facing a firing squad in the run-up to a holiday! However, I still often have trouble forcing myself to go out even when I want to, which is very much an ADHD thing: procrastination and so on. Once I'm out the door I'm fine.
Oops, sorry for the long ramble...