The thing you need to realize is that he's been 'emotionally divorced' for some time now whilst for you it's a new and sudden blow. His decision that he's 'done' wasn't made yesterday, I guarantee he's been thinking about this for weeks, if not months. He can be in the house and come and go as he pleases because he no longer cares about the marriage and to him, you are just a roommate. Sorry, I know that's harsh.
I've 'sort of' been where he is, in a different scenario. And I'm not saying you are at all at fault, just giving an example of 'emotional divorce'. My exH was abusive and I had 'emotionally divorced' him months before I got the courage to tell him I was done with him. In those months, he had absolutely no idea that I couldn't have cared less if he'd been stampeded by a herd of elephants. My 'facade' of the adoring wife was fully in place with no cracks. He was gobsmacked when I told him to GTFO.
I was lucky in that we our landlady was a friend of my family so when I told him to go he had to go. In your situation, just as you have been told to stay put, so he has been told the same thing. Neither of you can force the other to leave.
So what do you do? You pull yourself together and 'fake it til you make it'. No 'pick me dance', no tears in front of him nor pleading him to give things a try. You save those things for the dark of night or when you're with supportive loved ones. In fact, you must treat him as if he doesn't exist. If you are providing him any domestic services, that needs to stop right now. No cooking, no laundry, no shopping, no life admin, zip, zilch, nada. And if you have joint finances, they need to be separated, tomorrow.
I'm not going to lawyer up. At this stage, despite him being an absolute mole of a man, I will give the benefit of the doubt that he'll want to do this reasonably. Because trust, if I don't have the money to do so, he absolutely doesn't
Please don't do this. At least see a solicitor for a consultation. Your STBX doesn't deserve your 'benefit of the doubt'. And just because you think you have nothing, that doesn't mean a thing. My exH threatened to sue me for alimony (US, decades ago) because he was a student and I was working. I was in a 'no fault' state and what I thought was going to be simple and 'do it yourself' ended up with me having to consult an attorney. If you own/buying a house together, or even if you're renting, don't think he won't try to come out 'on top'.