Terry Pratchett wanted to die because he had Alzheimer's. As far as I know, Alzheimer's doesn't cause physical pain, so this dodge would not work in euthanasia for Alzheimer's.
Dodge?
How does that statement imply that pain is the only acceptable case? There are many other horrible, distressing and unpleasant things in life and not all of them involve pain. Pain is just a simple case.
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.