Absolutely don't let yourself feel like this is your fault. And absolutely don't let him suggest to you it was your fault, when he comes worming back to you....which he will at some point.
Please, please for the sake of your child, don't let yourself be one of those women who only feel worth something when there's a man around, and who let a crap man tell them that everything and anything that goes wrong is their own fault and always manage to work their way back into the woman's life. Please don't be one of those women, because you will suffer.....but your child will too. You are sounding like you are blaming yourself for what has happened. You are sounding as if he has tried to put all this on you and you believed him. Know the truth....that good men and good fathers don't walk out when their partners are 34 weeks pregnant. They don't wimp out regardless of something little like someone being moody. If you were or weren't moody, it doesn't matter - this was his choice, not yours.
And if he leaves now, he will do it again and again. It will damage you and it will damage your baby.
I know it is terribly hard, but at this point you must put your baby first and be really careful about how you react to the father. Get people around you who will support and help you, believe that you can be a good mother and cope alone and don't listen to any of his crap.
There are so many families who have messed up children, because the mothers weren't able to keep crap men out of their lives. They could have managed alone and their kids would have been fine.....but sadly, they had low self esteem which told them they couldn't cope alone and needed those worthless men. You don't.
Sorry if this all sounds harsh in your horrible circumstances. It's just that this happens over and over again. You have a chance now to make choices before your baby is born - see it as a benefit in disguise that you are getting that opportunity now.