You HAVE to get a lawyer for this legal emergency and you should do it yesterday. Some lawyers may accept payments, and you also may need to use credit cards and borrow from friends and family. Even a few days matter.
A writ of habeas corpus,etc have nothing to do with divorce. And you cannot speak with the judge without both sides present in most cases. A lawyer may be able to get a temporary order. Your chances of getting one without counsel are likely zero.
If you find this answer helpful, please mark it here on AVVO as helpful. In answering you, I am attempting to communicate general legal information and am not representing you (and am not your lawyer). Do feel free to call me at 404-768-3509 if you wish to discuss actual representation (the phone call also does not retain counsel; that requires an office visit and appropriate paperwork). In that a forum such as this provides me with limited details and doesn't allow me to review details and documents, it is possible that answers here, while meant to be helpful, may in some cases not be complete or accurate, and I highly recommend that you retain legal counsel rather than rely on the answers here. (You can also email my office at email@example.com . An email also does not retain my office, but can help you get an appointment set if you prefer not to call). I am happy to discuss possible representation with you. Any information in this communication is for discussion purposes only, and is not offered as legal advice. There is no right to rely on the information contained in this communication and no attorney-client relationship is formed. Nothing in my answer should be considered as tax-advice. To ensure compliance with IRS Circular 230, any U.S. federal tax advice provided in this communication is not intended or written to be used, and it cannot be used by the recipient or any other taxpayer (i) for the purpose of avoiding tax penalties that may be imposed on the recipient or any other taxpayer, or (ii) in promoting, marketing or recommending to another party a partnership or other entity, investment plan, arrangement or other transaction addressed herein. I am also required to advise you, if your question concerns bankruptcy, that the U.S. Congress has designated Ashman Law Office as a debt relief agency that can help people file bankruptcy.
I agree with my colleague that you should retain an attorney ASAP. If that is not an option, please consider speaking with one or working with one to help you draft the necessary the paperwork without going to Court with you. You will need to file a motion or at least complete a form prior to getting your temporary hearing depending on how your county/judge handles these issues. Please call to speak with an attorney who can provide you a bit more guidance!!