I need help getting over this break up

Me and My boyfriend has been going out for couple months and talking for more than that . He expecting a baby any day from his ex but he just broke up with me a couple days ago bc he feels he need space and he says he is confused. The crazy part I’ve been living with him for two months now. Now i have to move out and i don’t want to let things go bc i know he going to regret his decision. The only thing is getting to me i lost my appetite every time I’m around him, i cried when he isn’t around and sleep when he is bc idk how to deal with him. He tells me he know he gonna regret his decision but i just don’t get why go along with it then.... i just feel like crap. What should i do ?