How can do i emotionally leave?

I don't really want to go into the ins and outs, but I’m 34 weeks pregnant and for several reasons, I intend on physically remaining in my relationship for the time being. However, how do I pull away emotionally? This merry-go-round of disappointment where he lies, and says he’s gonna change but doesn’t.. I know it's not an ideal outcome, but one I feel is best right now. How can I detach? I need to stop focusing on how to improve this relationship and be the best mom i can be. I need to emotionally leave this relationship while living together.