The first thing you do, is you remember that you will be okay, whatever happens, and also, that Future-You will be SO proud of yourself if you handle this with dignity, and SO ashamed of yourself if you grovel and beg and plead.
You remember that if you beg and plead and cry, you will seem very available. Your ex will feel like you're there at his beck and call, so he can go and do what he wants, explore being single, etc, and you'll always be there if and when he wants to come back. So he won't respect you and will feel he has all the power.
If you are really brave, and walk away with your head held high, your partner will probably think "Shit - did I make a mistake?" He'll know he doesn't have the power. He might panic. He will start wondering if he made the right decision. You'll be able to look back on this time with pride, as the time you walked away with your head held high, you had dignity, you showed him what he's missing. If you behave with dignity and grace, he'll probably always wonder whether he made a huge mistake.
I wish someone had told me this before one of my big heartbreaks! Of course, in a mere few months I no longer cared at all about ex, and had moved on, was happily single, could see the relationship with the benefit of hindsight for all it's flaws. But I was still SO ashamed of myself for how I handled it with such a lack of dignity. What smug satisfaction that must have given him!
Whatever happens, you will be fine. So you just act like you're not bothered, walk away with your head held high.
What he did was disgusting. He is a truly awful person to let you move in with him knowing he was going to break up with you. It's extremely cruel. In a way, you're lucky that he's behaved so hideously because you can start to feel anger. You need to be angry because if you're angry, it's easier to stop seeing him as the person you thought he was. Instead, you can be furious with him for the horrible person he turned out to be. I agree that you should write a list of all the things you don't like about him, or that annoyed you. Maybe write it here! Know that if he was willing to just walk away in such cruel circumstances, you actually had a really lucky escape. Thank God he did it now and not when you had a mortgage together, or when you were pregnant. If he is willing to leave you in such cruel circumstances, it could have been worse and you're better off without him.
Although painful, it's good that you're not in your shared home. You need to NOT be in a place where you have memories. Erase him from your life. Delete and block him from social media, and block his number. Let him know that he can't just come back to you as and when he pleases. Definitely DON'T meet in person "to talk". Every time anyone does this they end up sleeping together but not getting back together and ending up feeling worse. A clean break is quicker and less painful.
Read the MN classics. You will be able to see some really inspiring and encouraging threads. I remember one where a woman in a serious relationship was dumped by text absolutely out of the blue. She was heartbroken too, but with support from her friends in real life and other women on MN she totally erased him from her life - blocked him, didn't contact him again, cut him out. Came on MN for support whenever she had a wobble and wanted to contact him and was talked out of it etc. In time she was over him, while he started texting her realising he'd made a mistake and wondering why she hasn't contacted HIM. Which she ignored, of course. All very satisfying. She won, he will probably always kick himself and wonder what might have been.
And then you treat yourself. Spend a lot of time with your friends. Start some new hobbies. Join a gym, get a new hair style, go shopping, make yourself feel great about yourself. Maybe in time join a dating app just for fun, have a few casual dates to help you remember there's a whole world of interesting people out there. Maybe go on a trip.
You will be fine.
Come on Mumsnet whenever you feel weak or sad or like talking to him.
Oh, and there's an app you can download to block you from being able to call certain numbers from your phone after a few glasses of wine. I'm not sure if you drink, but if you do have a few drinks around this time, I'd strongly recommend downloading this app and putting in your exes number BEFORE you start drinking, as it will mean you can't wine-call him! (If you don't know his number off by heart, just erase it from everywhere to avoid this happening!) I have SO many friends who have managed do behave with dignity after a break up and then shattered it all after a few glasses of wine by phoning their ex and doing something embarrassing like singing heartbreak songs Bridget Jones style down the phone to them 