David Benatar said this quote
“ Although they will miss his presence if he dies, his condition is too burdensome to require his continued presence. In such circumstances, what is selfish is the insistence that the prospective suicide remain alive, not that he seek his own demise. The argument about selfishness can backfire in another way. Just as it is sometimes the case that those who kill themselves have accorded insufficient weight to the interests of others, so it is sometimes the case that those who do not kill themselves make this error. Consistent with what I have already said, I do not think that the interests of others are decisive. Nevertheless, there are situations in which a person's interest in continued life is negligible, because he will die soon anyway, and the quality of his life is appalling. If seeing out his days, rather than taking his own life earlier, would spell financial ruin for his family (because of the costs of his medical care), then it may well be unduly selfish not to take one's own life. ”