Your calling it "suicide" (i.e. intentionally killing yourself) and "committing" (a crime) suggest that the action/intention/view you have in mind are not appropriate.
The following paragraphs from pages 82 and 83 of this Vinaya commentary,
The Buddhist Monastic Code I: The Patimokkha Training Rules Translated and Explained, by Thanissaro Bhikkhu suggest that the doctors would not be "killing" is they withhold treatment:
Inaction. Given the Vibhanga’s definition of taking life, we can infer that
inaction does not fulfill the factor of effort here, for it does not cut off the life
faculty. Thus if a bhikkhu sits idly when seeing a flood sweep a person
downstream, he commits no offense—regardless of his feelings about the
person’s death—even if the person then drowns. Recommending that another
person sit idly as well would also not fulfill the factor of effort here, because the
category of command covers only the act of inciting the listener to do any of the
four actions that would fulfill the factor of effort under this rule.
Medical care and life-support. The same holds true if a bhikkhu decides not to
give a patient a treatment—or to discontinue treatment—that might conceivably
extend the patient’s life: It does not fulfill the factor of effort, for such acts do not
cut off the life faculty. At most they simply allow it to end on its own. The Canon
supports this inference by treating such actions not under this rule but under
Mv.VIII.26.3-4, where it imposes only a dukka˛a on the act of refusing to give 83
any treatment at all to an ill bhikkhu, or of discontinuing all care for an ill
bhikkhu prior to his recovery or death. This shows that the compilers of the
Canon did not regard these acts as cutting off the life faculty. (Mv.VIII.26.8 lists
the ideal characteristics of a bhikkhu who tends to the sick, but does not impose
a penalty on a bhikkhu who cares for the sick but lacks the ideal qualities; at no
point does the Canon impose a required level of care for the sick. The compilers’
refusal to mandate a level of care is wise. If there were a case in which the
bhikkhus did not feel that that level of care was appropriate for their patient,
they would have only one option: to abandon the patient, so as to incur only a
dukka˛a and not the potentially higher penalty for not measuring up to the
mandated care. Thus, instead of protecting the patient, a higher level of
mandated care would expose the patient to abandonment.) For this reason,
deciding to withhold or discontinue a particular treatment—while still continuing
otherwise to care for the patient—would not be grounds for an offense
Beware of the way in which you talk about this subject with others. It is wrong to encourage/counsel suicide.
c) Describing the advantages of dying. This, the third type of act covered by this
rule, can include berating a sick person (“Why do you keep hanging on to life
like this? Don’t you realize what a burden you are to others?”) or simply telling a
person of the miseries of life or the bliss of dying and going to heaven in such a
way that he/she might feel inspired to commit suicide or simply pine away to
death. The Vinita-vatthu also includes under this type of act any statements that
a nurse might make out of compassion to shorten the miseries of an illness by
encouraging a patient to let go of life so as not to dawdle in the face of death.
Thus, the Commentary notes, a bhikkhu talking to a dying patient should be
very circumspect in how he chooses his words, focusing not on how to speed up
the dying process but on how to inspire the patient with the following thoughts:
“The attainment of the paths and fruitions is not out of the ordinary for a
virtuous person. So, having formed no attachment for such things as your
dwelling, and establishing mindfulness in the Buddha, Dhamma, Saºgha, or the
body, you should be heedful in your attention.” The Vinita-vatthu to Pr 4
contains a number of stories in which bhikkhus comfort a dying bhikkhu by
asking him to reflect on what he has attained through the practice, which was
apparently a common way of encouraging a dying bhikkhu to focus his
thoughts on the best object possible. The suttas also contain advice on how to
encourage patients facing death. See, for example, MN 143, SN 36.7, and AN 6.16.
In all of these cases, the advice is aimed not at precipitating death but at inspiring
calm and insight.
The Vibhanga notes that a statement describing the advantages of dying
would fulfill the factor of effort regardless of whether delivered by gesture, by
voice, by writing, or by means of a messenger. The same holds true for any
statements under the next type of act.
d) Inciting a person to die, the fourth type of act, covers:
—Recommending suicide. This includes not only telling a person to commit
suicide but also giving advice—whether requested or not—on the best ways to
commit the act.
There's a paragraph on page 85 which may answer your question directly:
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.
And page 86,
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.
You might like to read those several pages from the Vinaya commentary in their entirety (instead of only the quotes above).
Someone also wrote a commantary on the commentary, here: Vinaya Parajika 3 do not kill – accesstoinsight detailed commentary