Unfortunately, being in isolation usually exacerbates the mental health issue.
Often the treatment is to use medication, because there is so little in terms of other kinds of interventions, even though, as I mentioned, some of the most recent research, and some that Catherine Latimer spoke about happening in both the corrections and addictions areas, is showing that the most effective means are social interventions, providing support for people, not putting them in isolation, and providing opportunities for them to do other things.
In some ways it sounds almost like common sense. Of course, if you have other things to do, you're not in isolation and you're not stripped of your ability to read or have education, then not only might your mental health improve, but also your likelihood of wanting to anaesthetize yourself with drugs will also diminish.