Boyfriend being an asshole

We been together for over 2 years and he is completely a sweetheart but sometimes he is the worst. He makes me feel like dirt under his feet and everything is my fault and i just dont know what to do. All this stress on me and making me feel depressed isnt good for our baby but im not sure if he actually wants our baby. I dont want to leave him because of our baby and every time i do leave i end up right back with him anyways. I have no way to leave him anyways and have no where to go without him. Its like he controls my life and i cant text or talk to anyone and im always the worst thing that happened to him. He started to tell me he is tired of hearing my voice and seeing my face. But when we arent fighting we are ok. I dont know what to do and if i vent to someone then im putting our business out there and he gets mad. I dont know what to do i just want to be happy but how are you supposed to be happy if your other half you love so much hates you? I cant even explain what i go threw its just the worst but i dont know if its worth losing all the good times we have together. I just dont know what to do and I definitely dont want to have this baby alone