IF you hit the brainstem, it'll be perfectly adequate --but that's a big if.
Backcountry horseback outfits typically advise carrying a gun in case emergency euthanasia is required for an injured horse, and all of them say a .22 is adequate. If it's adequate for a horse, it's adequate for a human. (Side note: vets in Europe typically use a .32 Auto, my gun of choice if I decide to CTB with a gun.) However, it's a lot easier to aim properly at someone else's brainstem, horse or human, than it is to aim at your own brainstem.
In my own EMT training I learned that .22s are statistically the most lethal gun. Doctors hate 'em, because that little, high-velocity round can go swooping around inside a body, leaving lots of little holes, and there's no telling where it'll end up --which can be good, if it ricochets around and gets the brainstem, or bad if it goes entirely off target and only hits the parts of the brain that will leave you a vegetable.
If you decide to use a .22, you would be rash not to dedicate yourself to spending a great deal of time studying diagrams of the brain, to understand exactly where you need to aim, and then taking the time in front of a mirror to practice your aimpoint and stance. It's harder than you think to aim directly across your head with the muzzle behind your ear. And of course you will want to use a high-velocity hollowpoint round.
Bigger is better, because an overabundance of power makes up for flawed aim, but small and acurate can suffice. Success all depends on how accurate you are.