I found a wounded squirrel lying on a walk path a few years back. I first thought it was already dead but upon closer inspection it was still breathing. I didn't see any visible injuries so I have no idea what had happened to it.
I carried it into the forest, placed it on a stump and crushed its head with a large stick. It was as quick as it can be and I think I did the right thing but god damn I felt shitty about it for multiple days after. Red squirrels are my favorite wild animals around here. I just hate having to be the one who has to make the decision to end a life. I don't feel like it's mine to make.
I have an old pet gerbil too and I often wonder what I'd do if something happened all of a sudden and it was obvious it's in a lot of pain and needs to be put down quickly. The quick way is to just slam it onto the ground at full force but holy fuck I don't even want to think about having to do that. The alternative is a fabric bag tied around my truck's exhaust but those are some really uncomfortable final minutes. An enclosed container and a bottle of nitrogen would be the ideal method I believe. That leads to loss of consciousness and suffocation without the sense of suffocating (which is triggered by excess carbon dioxide).
In my truck I carry a hatchet for just this reason. A friend had to strangle a dying racoon once because they didn't have anything to hit it with.