killing a fish humanely
If you have reached the point that you know a fish will merely suffer and die in a protracted, agonizing way, you may want to consider euthanizing it. You should read "How do I know it is time?" from the American Veterinary Medical Association, which seems to be written with non-fish pets in mind, but still offers useful pointers.
Never flush it down the toilet
It is an inhumane way to get rid of it. It will live for hours or day in sewage that blinds, burns and suffocates it slowly. Just don't do it.
Don't pull it out of the water
Suffocation is not a good way to go. The fish lives and suffers for far too long in this process. There is some controversy on the Alka Seltzer method as well (2 tablets in ten gallons of water will kill a fish due to the high concentration of carbon dioxide), as there are some studies that indicate fish demonstrate some signs of suffocative suffering with it. However, there are many anecdotal cases where fishes seem to pass away quickly and with no agitation with the Alka Seltzer approach. The jury is out.
Decapitation may be difficult
Quick decapitation is currently regarded as a humane practice for fish. But that means holding it down, and cutting the head-off in one stroke without hurting yourself or half-killing it. That may be a tall order for anyone to try at home.
You have no poisonous injections to kill it with, but you can buy Finquel (the best answer)
This is how they do it in labs. The fish goes numb, slips into a coma and dies. You don't have these injections at home, but a vet might be willing to administer it for you. Or you could buy Finquel online. Finquel (aka MS-222, a white crystalline powder) is an animal anaesthetic that, when mixed with water in suitable concentration (one teaspoon in 1 gallon of water - it is extremely soluble) will cause the fish to go unconscious and die. However, be sure to add in an equal amount of baking soda (i.e. one teaspoon), as Finquel dramatically increases water acidicity, and will cause a lot of agitation in the fish if used by itself. The best way is to mix Finquel and Baking soda in water separately, and then add the solution to the container where the sick fish is. The fish will turn on its side after a few minutes, and all breathing will cease. Wait 15 minutes after gill movement cessation to remove the dead fish. Finquel costs about $25 for a 5 gram bottle bought online. Be careful not to inhale it.
Clove oil is the current second best answer
Put the irrecoverably sick fish in a gallon of water. 20 drops of clove oil will result in unconsciousness and death, but you can't just add clove oil drops in, as they won't mix in the water.
Instead, put them in a separate cup with some water and shake very hard. You have to work fast, as clove oil tends to separate out from water fairly quickly. The water turns milky when this is done correctly. Add the clove oil mix to the water and let the fish swim around. Soon, the fish will go listless and lie on its side. Watch all gill movement slow and cease, indicating death. Wait 15 minutes after gill movement cessation to remove the dead fish. You can also hasten and ensure death by adding a quart of Vodka once the fish is unconscious (don't add it before, however, as it will severly irritate a conscious fish). A half-ounce bottle of Nature's Alchemy 100% clove oil is $5 on Amazon.com, and most drugstores carry it (as a toothache remedy). Be sure to buy pure clove oil, as other oils in a blend can irritate the fish.