That doesn't mean that your child (who you decided to bring into existence for your own selfish reasons) should be obligated to remain alive and miserable. for your benefit. You made the decision to bring them into existence. Therefore, you caused yourself to be emotionally dependent on them, not the other way round. The risk of them committing suicide is a risk that YOU signed up to. It isn't on them to stay in existence against their will as your slave, just because you decided that you wanted to make slaves.
It's such a messed up scenario. No normal people bring others into this world intentionally to for them to suffer, but If people put their hand on their heart and said the true reason they had children, I believe the majority would be purely be for selfish reasons (they wanted children for their own pleasure, own purpose, own reasons, to give them meaning, responsibility, reasons to live, protection, someone for them to love etc.). How many people could hand on heart say their sole reason for having children was purely for the benefit of the child, I would argue very few, if any. Like did they really sit down one day and say this world is so magical that we simply have to bring someone new into it so they can experience just how magical this place is, I don't think so. For some the world is magical, but for others it's a dark place full of struggles, adversities, grief, pain, hard work, battles, conflict, illnesses and ultimately death awaits us all. We are all trying to soften the blow on ourselves by getting better jobs, earning more money for freedom and security, making friends to feel connected and less lonely/isolated, having a family to fit in with society and to have children that gives us pleasure, purpose, security etc. People by nature are inherintly selfish and in a lot of respect having children is an inherintly selfish thing to do.
I don't personally have any children, we did try but after a miscarriage and failed IVF it just didn't happen. That's not sad for the unborn child because they know nothing of it, it was incredibly sad for me and my partner because we wanted a child in our lives, we wanted to experience the magic of seeing what the child looked like, raising and nurturing the child, but still, all of those reasons are because that's what we wanted and I emphasis the word we, it's not necessarily what the child would have wanted because they are not created yet.
If the child had of been born and went on to suffer some chronic illness that caused them either physical or mental anguish that could not be cured, then how many parents out there would accept if the child said they wanted out of this world for their suffering to end. I believe very few would accept this, again for selfish reasons. If the child is gone then the parents feel like a failure, they are left without that main purpose in their lives, they are left with grief of their loss, left without protection, left without meaning etc.
My point here is having children whether you like it or not is a selfish act, as is not letting your child go if they are suffering and wanting to end it. Very sad, but also very true.
The moment you become a parent, you made that decision, so if you're the one suffering then I believe you have a duty to do everything possible to keep going, but I also understand there are limits and when pushed beyond what the mind is capable of taking, even parents will and do take their own lives.
If you're the child with no children of your own, then you do not owe it to your parents to keep suffering. They brought you here without your input, so should accept you wanting to leave out of love, compassion and not wanting you just to be around and suffer for their own selfish reasons.