I want to fight for custody (need help!!)

I just had my first baby. He is now six months old. Unfortunately the father of my son has caused me to want to fight for full custody. He isn’t on the birth certificate but he’s going to court to try and get on it. The reason why I want to fight for full custody is because he is very abusive to me and I’m scared he will abuse our son. We were in a relationship before and he lived with me where he would abuse me and even once raped me. I told him I didn’t want to be touch by him. His abuse got to the point where I decided to start defending myself. So that means I started hitting him back. During my pregnancy I got an emergency restraining order on him because he shoved me done to the floor after I told him to leave my house. Just yesterday we got into an argument which got physical. The argument was over him cheating on me with a MINOR. We’re 19 (me) and 20 (him). I told him to leave even before we started the argument and he didn’t. I opened the door for him too. I slapped him and he started choking me. He put the baby on the bed and he pinned me down. I told him to stop and to get the baby because he was too close the edge and I have a high bed. I then told him to leave my house and he wouldn’t listen. So I hit him and kept telling me to leave. He chocked me again and I was losing Conscience so I fell on the floor. And he started picking me up and I was fighting to stay on the floor. My mom walked in as I was standing up and he started pulling my hair and choking me. My mom started trying to pull him off and trying to tell him to leave so he finally did. I want to fight for full custody. I don’t even know the first step because can’t I get into trouble for hitting him too? I have prove of him being abusive to me and witnesses and I have prove that he raped me. Do I need to get a lawyer? Who do I need to talk to? I just need some help with trying to figure this out. Like what should I do? And please don’t judge me. I have tried leaving him many time especially throughout my pregnancy. But he just kept coming back and I don’t even know why. He told me he hoped I’d miscarried my baby. I just don’t want him in our lives anymore. I know I should’ve called the cops but I was too scared. Now I just want to fight for my baby and myself and it’s hard because I don’t even have a job at the moment. I was in bed rest most of my pregnancy. I’ve been applying and doing my best to find one. I’m just glad I have a supportive family by my side. Help me please give me some advice.