Advice please.. long post

I'm 31 weeks pregnant, I'm 17 and a senior in high school. The child's father and I had been together for almost a year. Well just 2 weeks ago I found out he's been cheating on me. I don't know what to do, I have no one to talk to and I just need advice. He denied the baby and said he regretted getting me pregnant so the girl would continue talking to him, while he was with me. Well when I confronted him about it he didn't care, he blocked me on everything (social media) but every now and then he will text me and make me feel like he still loves me and then he will say oh no I don't want to be with you. He threatens to take the baby from me.. I just have no idea what to do I love him so much and I could never be with someone who cheated on me and as much as I want him to be in the baby's life how do you say you regret the baby and that you don't think it's yours... please someone give me advice or just some positive input on what I should do. I feel like he doesn't deserve to be in the baby's life but it's not fair to take it out on the baby so that he doesn't have a dad... the relationship was the most toxic thing ever, lying and constantly hiding things from me. I should've left a long time ago.