Regarding suicide, Louis Jacobs, a leading scholar in this area and author of "Suicide in Jewish Tradition and Literature,” most Jewish scholars do not link suicide with the Ten Commandments at all.
The Hebrew Bible has only two references to suicide. The first is found in 1 Samuel 31:4, where a badly wounded King Saul begs his archers to kill him so as to avoid being taken captive and tortured by the Philistines. The second is in 2 Samuel 17:23, where Ahithophel, seeing that his rebellion against King David was lost, “set his house in order, and hanged himself.” Interestingly enough the Bible does not condemn or even comment on either act, and suicide is not among the prohibitions articulated by early Jewish sages.
The Talmud, too, makes no mention of suicide, though it does tell the story of Rabbi Chanina ben Teradion who was burned alive by the Romans in the presence of his students. The latter urged him to breath in the smoke in order to hasten his death, but he refused saying, “It is better that God Who gave me my soul should take it rather than I should cause injury to myself.” It is only in a post-Talmudic rabbinic text called Semachot that we find a negative attitude toward suicide:
He who destroys himself consciously, we do not engage ourselves with his funeral in any way. We do not tear the garments, and we do not bare the shoulder in mourning, and we do not say eulogies for him; but we do stand in the mourner's row and recite the blessing of the mourners because the latter is for the honor of the living (Semachot, Chapter 2).
The key here is “intentionally.” Because we can never truly know another’s intentions the rabbis go out of their way to find mitigating circumstances such as illness, acute stress, fear, or pain to declare the death not to be a suicide. They even argue that only a person who calm and dispassionately announces he or she is going to commit suicide and then does so immediately can be counted as a true suicide.
With regard to euthanasia, Judaism rejects active euthanasia but not passive euthanasia. Jews do not have to prolong life against all odds; we can discontinue procedures that are preventing nature from taking its course; and doctors can administer dangerous, though not definitely lethal, amounts of painkiller such as morphine even at the risk of causing cardiac arrest if the intent is to relieve pain and not kill the patient. Once again intent is the key, and because intent is nearly impossible to ascertain, Judaism can be strongly opposed to certain behaviors in theory and yet very open hearted and nonjudgmental in practice.
This is all somewhat academic, so let me share a person story. One of my students at MTSU came to me a few years ago distraught over the apparent suicide of a close friend of his. He worried about his friend’s fate in heaven.
My student’s dad, a Southern Baptist pastor, told him that regardless of how the boy lived, his suicide condemned him to the fires of hell for all eternity. He was hoping I could provide an alternative view. I explained that the general rule in Judaism is that at the last minute as he was dying his friend regretted his action and hence the death is ruled accidental rather than a suicide. Therefore he is in heaven not hell. This proved too lenient, and my student went back to the harsher ruling of his father. What is it about us that needs the suffering of others to justify our own heartlessness?