It boggles my mind how OP's mental health services did not act (accordingly) here. I am not saying that it would have been better to commit OP, but the fact that they asked for help for months and even expressed concrete plans at the end shows, in my understanding, that they had not only hoped for help, but had fought for it, until the very end, which only makes the whole thing more tragic.
If OP has really passed away, I wonder if legal action cannot be taken against their mental health services since the they knew of their intention. This is really fucked up but probably/sadly not that unusual.