I don't know about detachment in a poly sense but I do know that folks who go to Al-Anon or something similar learn about and practice ways to keep one's sanity while the loved one loses theirs - literally, to mental illness sometimes, or to addictions.
Start poking about for a support group for people who care for people with depression. Or perhaps an individual therapist or trusted friend?
It is one of the hardest things on earth to watch a loved one spiral into depression, addictions, insanity, etc. There is often very, very little you can actually do to help, or even make things less bad.
One of my boundaries is that while I will consider being in a relationship with someone with a mental illness (Beloved has bipolar and it was something we dealt with when we were together) I will not stay involved with someone who is not dealing or managing their mental illness consistently. Your boundaries will vary, obviously, but detachment may not be enough. You may want to start thinking about walking away.