You cannot euthanize a dog humanely using Xanax.
Xanax (Alprazolam Tablets) are not a suitable drug for euthanasia.
The dose that killed half of the rodents tested (LD50) is in the order of 1000 to 3000mg/kg.
So a 300g rat would need to eat about 1000mg of Xanax or 500 x 2mg tablets to achieve the LD50 dose!