You can file for divorce and have him served, whether in prison or (if you move quickly) before he leaves jail. Whether or not he contests the divorce? That's not something I can anticipate. He will be in a poor position to fight the divorce, and will be in no position to claim custody.

Here are some potential sources of legal assistance.