A Jew may not do anything which will hasten the death of another Jew. This is a selection from here, by Rabbi J. David Bleich (I added the bolding)
The practice of euthanasia-whether active or passive-is contrary to the teachings of Judaism. Any positive act designed to hasten the death of the patient is equated with murder in Jewish law, even if death is hastened by only a matter of moments. No matter how laudable the intentions of the person performing an act of mercy-killing may be, the deed constitutes an act of homicide.
One nineteenth-century commentator finds this principle reflected in the verse "But your blood of your lives will I require; from the hand of every beast will I require it; and from the hand of man, from the hand of a person's brother, will I require the life of man" (Genesis 9:5). Fratricide is certainly no less heinous a crime than ordinary homicide. Why then, having already prohibited homicide, is it necessary for Scripture to prohibit fratricide as well? R. Ya'akov Zevi Mecklenberg, in his commentary on the Pentateuch, Ha-Ketav ve-ha-Kabbalah, astutely comments that, while murder is the antithesis of brotherly love, in some circumstances the taking of the life of one's fellow man may be perceived as indeed being an act of love par excellence. Euthanasia, designed to put an end to unbearable suffering, is born not of hatred or anger, but of concern and compassion. It is precisely the taking of life in circumstances in which it is manifestly obvious that the perpetrator is motivated by feelings of love and brotherly compassion that the Torah finds necessary to brand as murder, pure and simple. Despite the noble intent which prompts such an action, mercy-killing is proscribed as an unwarranted intervention in an area which must be governed by God alone. The life of man may be reclaimed only by the Author of life. So long as man is yet endowed with a spark of life-as defined by God's eternal law-man dare not presume to hasten death, no matter how hopeless or meaningless continued existence may appear to be in the eyes of a mortal perceiver.
(TRADITION 30:3 / Copyright 1996 Rabbinical Council of America, pages 52-52)
However, there is a famous story of the death of Rabbi Chanina Ben Tradyon and his executioner from Avodah Zarah 18a
אמר לו קלצטונירי: רבי אם אני מרבה בשלהבת ונוטל ספוגין של צמר מעל לבך אתה מביאני לחיי העולם הבא?
אמר לו הן. השבע לי. נשבע לו. מיד הרבה בשלהבת ונטל ספוגין של צמר מעל לבו.
יצאה נשמתו במהרה אף הוא קפץ ונפל לתוך האור.The executioner said to him: My teacher, if I increase the flame and take off the tufts of wool from your heart, so that you will die sooner and suffer less, will you bring me to the life of the World-to-Come? Rabbi Ḥanina ben Teradyon said to the executioner: Yes. The executioner said: Take an oath for me, that what you say is true. Rabbi Ḥanina ben Teradyon took the oath for him, and the executioner immediately increased the flame and took off the tufts of wool from his heart, causing his soul to leave his body quickly. The executioner too leaped and fell into the fire and died.
Not only is the suicide of the executioner apparently condoned, but his act of "mercy", hastening the death of R. Chaninah earns him a place in the world to come.
Is, then, euthanasia on a Jew allowed if performed by a non-Jew?