Hope I'm not intruding on a private conversation but here goes.
Like Batty, I went to work everyday. I was a teacher so I was surrounded by preschooler/kindergartners who needed me to be calm, warm, and supportive. I had something I called autopilot. I would disengage and let that part of me take over, go through the motions. I was a very good teacher. No one except a couple of close friends ever knew.
When I'm depressed, the easiest thing to do is withdraw from anyone and everyone who cares. The little bit of effort it takes just to maintain normal civility is just too much. The mental pain seems unbearable. It's just easier to be alone. For me all of my effort went to getting through the work day. By the time I got home, I had nothing left.
That's the incidious nature of the disease. It clouds the thinking. It makes you want to do things that actually perpetuate the disease. The things that could actually help are the last things you want to do when you're in the depths. The thinking becomes very black and white, good or bad, wrong or right, nothing in between. For me when things are so bad my choices seem to be live and suffer, die and have peace ... cut myself or kill myself. My psychologist always tells me, there are always more than two choices and of course that's true. But when I'm in the worst of the depression I don't see the other hundred choices that exist.
So, I guess what I'm saying is that it is possible to function in one area and totally NOT in another.
Take care of yourself.