Your post made me cry OP, I'm so so very sorry for you and your family at this difficult time.
You have 100% done the right thing, your son didn't want to die, the illness he has tricked him into thinking he did. In time, when he's received the treatment he needs he will come back to you. You have literally saved his life. He'll realise that.
Right now you need to be strong and to remember that whatever happens or is said in the next few weeks isn't a reflection of the truth and is not your son talking but his illness.
His depression is no reflection of your parenting skills, however, what you've done tonight is.
I can't stand in your shoes entirely, but, my father died by hanging himself and it caused unrepairable damage to many who loved him.
So, not only have you saved your sons life but you've also saved others.
Stay strong OP. Whatever comes you can handle it, one day at a time, it will get better.