Meditation and the proper use of pain killing drugs should enable a person to attain a state where they are not in mental pain, and so no longer contemplate euthanasia or suicide.
Buddhists might also argue that helping to end someone's life is likely to put the helper into a bad mental state, and this too should be avoided.