I want to turn myself in

I’m 21 weeks and I’m so debilitatingly depressed. I’m scared of what I can do to myself. Then I get angry at myself because I feel like a terrible mother. What kind of a mother thinks of harming themselves when they have a baby in their womb? But here I am. And I don’t know what to do. My SO isnt a help. I’m thinking about just going to the hospital so I at least know I’m safe and will be taken seriously. However I don’t know if that means CPS will be involved? Will I have contact with anyone when I’m there. I’m just trying to do what’s best for me and my baby. I’m at rock bottom here.