I'm sorry that you got so depressed. You are right, your children do need you. I took a friend to the hospital once after she tried to commit suicide. That was 10 years ago. She went on the have a fabulous life after that. She pulled herself together and got a nursing degree and a career. Her kids grew up and went to college. And her ex even made a lot of money and bought her a house to raise the kids in.
OK, well, the last part is rare and doesn't happen to everyone. But the point is she was so depressed and thought things would never get better, and she was very wrong. Things not only got better, they got really good. And that can happen for you too.