My husband cheated

My husband cheated on me and then today I find out I’m pregnant. We have been trying and then he did what he did and I told him cause I don’t feel it’s right to keep it from him but then he says I’m getting custody when the baby is born I’m so scared because I don’t want him to take my child!!