Yeah I was a violent drug addicted alcoholic who had served several long sentences in prison, with a failed marriage, sole custody of my young children and no money unless I went and did more of the same. Decided that was no longer an option. Left the area I was from, started from scratch washing cars and windows. moved on to trading in cars etc, then property, meanwhile got into a very good relationship, had a great life, had a second family and became pretty successful. I feel now that I am stable, happy, successful and it's largely down to the fact that I had a long term horrific patch. It's very possible to emerge stronger, better adjusted and altogether more in touch after a very bad patch because it really does give you a sense of proportion.
Concentrate on the most serious thing which at the moment is avoiding going to prison, so make sure your defence team are the best you can possibly get. Exercise to help lay off the booze, begin to regain control and accept that things might not be as you wish them to but that long term everything will be fine. Even if you do end up going to prison, take control of that, use it to your advantage as time out to strategise your life plan when you are released, if it's a sentence long enough to take courses do that etc etc etc. Happiness is about being in positive control of your life with aims and goals, you can't control everything but what you can control you must, so prioritise and don't allow fear and paranoia to cloud your long term judgement.