Beware that even describing the advantages of dying is an offence.
I quote from this commentary on the Vinaya.
Page 74:
Should any bhikkhu intentionally deprive a human being of life, or search for an
assassin for him, or praise the advantages of death, or incite him to die (saying): “My
good man, what use is this evil, miserable life to you? Death would be better for you than
life,” or with such an idea in mind, such a purpose in mind, should in various ways
75
praise the advantages of death or incite him to die, he also is defeated and no longer in
affiliation.
The following fragment (quoted below) might be relevant to the case you're asking about e.g. when the person is terminally ill.
Don't take my word for it though!
Also this commentary is to do with whether the dying monk incurs a monastic penalty (not with whether it's a karmically optimal course of action).
Page 85:
The Commentary extrapolates from this case to apply the dukkata to all
attempts at suicide, including even the decision not to take food when motivated
by a desire to die. However, it then runs into the question of how far this penalty
applies to a bhikkhu who is ill. Its verdict: As long as medicine and attendants are
available to him, the penalty would still apply. But then it lists two cases where
the penalty would not apply: (a) A bhikkhu is suffering from a long and serious
illness, and the attendant bhikkhus are fed up with caring for him, thinking,
“When will we be free of this sick one?” If the bhikkhu reflects that, even with
medical care, his body won’t last and that the bhikkhus are being put to
difficulties, he incurs no penalty in refusing food and medicine. (b) A bhikkhu—
reflecting that his illness is harsh, the forces of life are running out, and yet the
noble attainments appear to be within his reach—may refuse food and medicine
without penalty.
The Commentary’s deliberations here show how difficult it is to legislate in
this area, and there are reasons to question the way it applies the Great
Standards here. Case (b) is apparently derived from SN 4.23, where Ven.
Godhika takes his life and gains arahantship just moments before death; and
from SN 35.87, where the Buddha says that one who puts down this body
without taking up another body dies blamelessly. However, in arriving at its
verdict in this case, the Commentary has to add the factors of motivation and
perception to the equation, factors that are absent from the rule on which the
judgment is based. It also leaves unanswered the question of how harsh the
86
disease has to be, and how near the anticipated attainments, to qualify for this
exemption.
This same holds true for case (a), which entails even more dubious reasoning.
The Commentary’s judgment here has no clear precedent in the Canon; there is
no clear line for deciding exactly how bad the illness and how fed up the
attendants have to be for this case to apply; and why should the feelings of other
people determine when it is or is not allowable to refuse food?
It is worth noting that the origin story to the original rule here gave the
Buddha the opportunity, had he wanted it, to formulate a general rule against
attempted suicides, but he chose not to. He later formulated this subsidiary rule
only when a bhikkhu attempted a suicide in a way that endangered the life and
safety of another person. Thus a more appropriate way of applying the Great
Standards to this subsidiary rule would be to extend it only to cases of that sort:
where a bhikkhu’s attempts at suicide would bring danger to another person’s
life and limb.
As for ways of attempting suicide that do not endanger others, it seems
better to follow the Buddha’s wisdom in not legislating about this issue at all, and
to treat it as a matter of Dhamma rather than Vinaya. In other words, one
should keep in mind his comment in SN 35.87 that the only blameless death is an
arahant’s. If, lacking that attainment, one chooses to refuse food when ill to
speed up one’s death, one should be heedful of the risks that death and rebirth
can involve.
I guess my personal/unreliable hypothesis on the subject is that it's like medicine: i.e. a patient may take medicine because they are ill, not in order to cause illness.
Similarly a patient might stop eating when (or because) they are dying, not in order to cause death.