Moms...I need custody advice.

Since the beginning, my babies dad has wanted me to get an abortion. I’ve been firm against terminating and keeping my child. About a month ago, he was arrested for unlawful imprisonment and Assault 4 DV against me, but the charges were dropped because they deemed it was lawful since I was suicidal (me and pregnancy hormones don’t mix). Today, things switched around, and the babies dad has decided that he wants to fight for FULL custody because I’m still firm against giving my child up for adoption/aborting, and he said he’s getting a second job to hire a lawyer, and that he’s fighting for custody so that he can “laugh in my face when the judge grants him full custody”. He believes he can win the case since I have a past of suicidal ideation/BPD episodes, and since he’s legally an adult and his job pays more than mine. Ever since he got arrested after my suicidal episode on the night he went to jail, I have gotten back into counseling and am currently working on getting back on my medication. I can provide for my child, I have a permanent, safe home for this child, and I believe I’ll be a damn good mother. The only problem is that I’m 17 and I can’t afford a lawyer, and neither can my parents. I have text proof he threatened to take full custody if I didn’t abort/give up for adoption. I don’t mind 50/50 custody, I want him in this kids life if he wants to be in it, but I don’t know what to do. I feel like he’ll win if he has a lawyer.