You have a LOT going on right now. Not just addiction, but life problems too. Just from a VERY practical standpoint- since you are having a financial crisis, housing issues, and legal issues- a lawyer is clearly in order and surely you have one. This also may be a situation where the services of a social worker are helpful. Can you find a social worker in your area?
Please don't drink. Do anything but that! You have suffered enough. 40 is not old! You can change, but you can't do it alone. If they offer counseling in jail- use it! Do you know how much time you're looking at?