The only approved method is administration of an overdose of sedative by a veterinarian. The animal must still experience the stress of the trip there, and the needle stick, when this done--but then it will be sedated, and will pass without further pain, even though it may take a while.
The only approved method is not necessarily the most humane method, however, as I pointed out. Instant destruction of the brain is a terrible thing to have to do, but it's free of pain, it's instant, and there is no question about how long the animal may have suffered. This is the same method most owners of small numbers of snakes use to put down rats in order to feed them off.