Reference: Fataawa Mu’aasirah – Page 397
Liqaa.aat al-Baab al-Maftooh – No.827
Question: [Consider the situation where] some of the animals have been afflicted with an illness and are in severe pain, or they have an infectious disease, is it befitting that they should be killed or left [alone]?
Response: If a person has an animal which he is responsible for – either because he owns it or it is in his possession, and this animal is afflicted with an illness which renders it of no benefit, then there is no harm in killing it. That is because if it remains in this [sick or diseased] state it will be a[n unnecessary] burden on him. He will then be required to spend [time and money] on it, and doing so is a waste of money because he is spending [his time and money] on something which he will not benefit from.
So based upon this, we say there is no harm in killing this animal if it is sick and benefit cannot be sought from it, or if it is diseased and it is feared it may infect the other animals; this is the case if he is responsible for the animal. If, however, he is not responsible for the animal whether it be a donkey, a dog or [any other] beast in the wild, then he must leave it to what Allaah has decreed for it.