I don't have much in the way of advice, other than to say the feelings of having a child are something that can scare a man who is not used to having such feelings or is having difficulty adjusting to said feelings.
This does not excuse any behavior he has, nor should it be an excuse for him.
But it is fairly common for an A during pregnancy from what I've read. There is nothing wrong with you, and it isn't because of you.
As much as you can, detach. Recognize that he is not himself and as much as possible recognize that he is a stranger for now. Live your life, do what you must do.
If he wants to be involved in your child's life, by all means encourage it. But don't let him feel like he should stay out of guilt, because that will only exacerbate his feelings.
You are at a vulnerable state, and I am saddened that you have to go through this. You sound like a strong person, and you have a right to feel upset and lost at times. Lean on who you can, even if it helps you here, we will be here to listen and offer helpful advice.
"You can't reason someone out of a position they didn't reason themselves into."