You do not provide any information about your current residency status. However, as you mention potential deportation, I am going to assume for the pruposes of this answer you do not have a residence permit.
If you also do not currently possess a Duldung, you could in theory be deported. It is therefore important you inform the Ausländerbehörde about your new circmstances. I recommend you apply for a Duldung (in writing, along with a copy of the Vaterschaft and Sorgerecht) with your local Ausländerbehörde. They should issue you with a Duldung based on your expected child.
Once your child is born, you are entitled to a residence permit according to paragraph 28 of the Residence Act (Aufenthalzsgesetz). This right is based on you having custody and access rights to the child and is dependant on your having a relationship with the child. A requirement for this residence permit is that you possess a passport or have made unsuccessful attempts to do so.