In the past, I've accidentally shot a dog and the others attacked and killed it.
I once accidentally hit my sow and was attacked by it. My solution that time is as follows: One solution I've found to work is to tie (if possible) the animal to a tree, keep your other animals apart from it, and then log out the game.
Avoid shooting your own animals when hunting/fighting. Avoid clubbing your own animals while hunting/fighting.