I used to stun my mice before feeding and I actually tried the tail pulling method thinking it would be more humane and quicker than hitting them on the head but it had the same results that you described. The most humane method to euthanize a rat (or any rodent for that matter) is by CO2 gas. You can find instructions for making a simple euthananization chamber here.


Edit: Moriar beat me to the link