Your best next step, without a doubt, is to get a lawyer.
The longer this goes on the weaker your case becomes.
The father is establishing a status quo where the child lives with him and you are hardly involved. Generally courts do not like to changed established status quos.
So you need a lawyer to take this on at once and for that lawyer to deal with the social worker and make it clear you went to rehab and your child is safe with you and then to proceed to go to court to get an order for joint custody, if possible.
And as you know you are about to be served there is no time to delay anyway.
If you are low income you can get a legal aid certificate to fund this case.
But you cannot wait at all. It will soon be the holidays and the legal system will shut down. If you don't move fast nothing will happen at least until mid-January.
Does that help as a starting point?
Please feel free to post back with any follow-up questions you may have. If you don't have any then I hope I have earned a 5 star rating but if you don't feel that I have please don't hesitate to reply back and let me know what more I can do to assist you. Finally, please know that even after you rate me I will be here for you and you can ask follow-up questions if you think of them later on at no further charge of course.