In my latest reading of A Code of Jewish Ethics, Volume 2: Love Your Neighbor As Yourself,
Joseph Telushkin talks about Judaism's stance on suicide. Telushkin
refers to Babylonian Talmud Gittin 57b, in which four hundred young Jews
are being transported via ship to Roman brothels, and they kill
themselves because they don't want to be prostitutes. According to
Telushkin, "the Talmud writes of their act with approval", presumably
because they sought to avoid what Telushkin calls "a life of torment and
degradation".
But, as I read on, my impression was that Judaism
overall frowns on suicide and euthanasia. A person can pray for his own
death, or (as Telushkin narrates) an old lady can stop attended morning
prayer services in an attempt to encourage God to hasten her demise,
after God had lengthened her life precisely to reward her faithful
attendance of those services. But one should not kill oneself or
another person. At the same time, Telushkin notes examples in which
Judaism has allowed people to refrain from artificially extending life
and to let death take its course, especially when there is extreme
physical suffering.