Do buddhists agree with euthanasia?
It is complicated, but that is the bottom line. There is no suicide or euthanasia.
If the soul is done with suffering, it will leave the body and then the body will die. If the soul chooses to remain it is because it chooses to remain with the pain in order to let go of it or use it to release other emotions.
As you have experienced yourself, when you feel pain there are no other emotions, there is a clarity. This is sometimes useful for the soul.
The suffering will end. When the soul is done it will release itself. It is not for others to decide when the soul is done. Those around must respect the soul's wishes.
Pain medicines are acceptable, but it should be a choice. If you avoid the pain you retain your attachment to the source of the pain. Sometimes, if you are not ready to deal with the pain you reach quickly for the medicine, but then the attachment only grows.
It is difficult, but it is a part of life. Be careful that your desire for euthanasia is not a desire on your part to control someone else's life. To control the world or speak for them.