The issue of euthanasia has long been obscured by a lack of a simple distinction. A person’s lifespan should be properly divided into two parts: life, and upon its end, a process of dying in agony. This latter can last for more or less long; it can take days or years.
The telltale marker upon which the process of dying begins in earnest is very clear: when a person in an extreme old age can no longer take care of himself, nor is there a hope for recovery. This is marked by two aspects: quality of life for that person goes down to zero or below, if he is in pain; the process is naturally irreversible, because a body that does not move, keeps decaying and dies (physically; just as a soul that does not aspire dies spiritually).
While it is uncontroversially immoral to commit suicide during life, the situation is relevantly different after life ends and dying begins. If a dying man wants to keep at it, and to pay for his own upkeep, it is also obvious that no one can up and murder him. But I think it may be morally permissible for one to desire to shorten his own period of dying.
Again, the consensus is already that extraordinary means to postpone death need not ethically be applied. Furthermore, if drugs that alleviate pain attendant upon agony will predictably shorten the lifespan, then they, too, may lawfully be taken. Why not, however, take this to the logical conclusion: ultimately, if a dying old man wants to take a drug to induce death right now, then he is morally in the clear about this decision.
Note that I in my usual habit am using “man” and “he” to refer to our species or its representative member, but this is a problem of far more importance and urgency to women who both live longer than men and die longer than men (with their longer overall lifespans turning out then to be both a blessing and a curse) and can thus linger at death’s door for months and years in horrible decrepitude and suffering.