I'm sure this has happened to lots of people: you somehow injure a bug (or some other animal). I have always heard that this is a case of Tzaar Baalei Chaim, and that you should kill the bug to ...
Is there any halachic objection to rigging a live worm onto a hook when fishing?
Are you allowed to kill flies and other pests (mice, mosquitoes, etc.) or would that go under the prohibition of Tzar Balay Chaim?