Having literally everything you are slowly erased can be massively distressing to people.
And by your own reasoning, doctors are not allowed to kill them, because they're only allowed to kill people in pain and only by using physically damaging painkillers.
Yet again. You seem to lack a basic understanding of the difference between if and iff (if anf only if).
If does not imply iff.
Over at Scott Adams' Blog you can find a very fine example of using the 'Rationality Engine' to solve the social problem of assisted dying.