I don't know what to do

This is my first little blessing but it's been so stressful. My boyfriend of over 2 years was happy at first and even got me to quit my job because the doctor was worried what I was doing would cause a miscarriage. But now it's like he doesn't want the baby at all and he says stuff that tells me he doesn't. He says he hopes I have a miscarriage and he wants me to have an abortion and stuff like that. But when I told him to leave because of it he says he didn't mean it that he was just upset but he says it almost every other day. He also says he's just stuck with me that he doesn't even want me and so I told him to leave but he won't. I don't know what to do about the situation at all. I love him with all my heart but he's made it clear he doesn't want the baby and I'll always put my child first.