I was in this place shortly before coming to the board. The reason I didn't go through with it is that I felt my children deserved better than to have to live with that legacy.
You are needed. And you are important. And you can get to the other side of this situation.
My friends on the board helped me through the LRT, and it was very empowering. And using it is good training for the relationship ups and downs that occur even after you get back together. Building your skillset helps you through depression as well.
I hope you have been in touch with someone, preferably in person, that can help you immediately, a healthcare professional, a pastor or crisis center.