Saving a relationship

Lately, I have been thinking about all of the things that I did wrong in my current relationship. Like, some really awful things all of which he knows about... but still. Just sitting here thinking about it, I feel shitty. Our relationship is on the rocks now and he's being a douche to me and I kind of feel like I deserve it. It makes me stay and put up with it... even though I am unhappy. Everyday, I am trying to improve on us, but I am doing it alone and I can't take it anymore. And we also have a child on the way, in a few weeks. I just want to get everything sorted out before she gets here so that I can be happy and begin to heal.. but I don't know how to get to that point. Especially since he will not talk about anything like an adult.