I’m extremely mentally ill and have had suicidal ideations for years. I’m going to jail in 5 days for 6 months. I’m a weak, broken shell of a person. How do I get by?

I hope this stays up. I just need help. I’ve struggled with addiction my whole life and it’s landed me in jail for 6 months. I’ve been struggling to hold it together on the outside and now I am just so scared and hopeless and I don’t know what to do. I just want to die but I can’t do that to my family. What can I do to get by in there? How does one stay sane when they are as wrecked of a human being as I am? I’m addicted to opioids and benzos and severe mental illness. Hoping to get some advice and will be grateful to anyone who responds.