Contact a lawyer and get child support set up. If he is still drinking or drugs .... well you can petition he’s not safe for the child to be near.
Do not beat yourself up. You wanted him to be a good man... HE decided to be a sucky human being.
Be kind to yourself