There is no compassionate way to take the life of an animal that wants to live. If you are violating another being's free will/consent, it is, by definition, a violation of that animal's life.
Example: Let's say you raised a dog and treated him well for a few years, and then decided to slit his throat - such an act is not compassionate or humane, regardless of how well the animal was treated in the past.
Thanks for reading and commenting.