Islam is a mercy not only for all humans but it extends its mercy to all creatures as well. Almighty Allah says: “We sent thee not save as a mercy for the beings.” (Al-Anbiya’: 107)
Being a mercy to all creatures, the Prophet of Islam showed us through his commandments and teachings how to tend to and care for these creatures. The Prophet (peace and blessings be upon him) explained Allah’s anger and punishment for those who burden animals or treat them mercilessly. For example, he once said: “A woman was deemed to enter the Fire because of a cat. She imprisoned it and neither fed it nor set it free to eat the rodents of the earth.”
In his response to the question you raised, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “If your pet\animal is sick and it can be treated you must do so if it is within your means and ability to do so. Simply allowing a cat to be ‘put down’ because it is sick is not allowed in Islam. Should you do so, you will be responsible before Allah for causing undue suffering to an animal.
“If, however, your pet\animal is too sick to recover and there is no hope of it ever being able to lead a normal life, or you do not have the means and resources to get adequate treatment for it, then you must hand it over to the humane society. It is up to them to decide what to do with the cat. If they decide to “put it down” because of not finding a home, or because of their decision that such an animal cannot be cared for or let free, it is permitted to do so according to the principles of the Shari`ah. It is generally agreed by scholars that if leaving certain animals free becomes a cause of genuine concern for the safety of human habitat and society, it is permitted in Shari`ah to ‘to put them down’ as a lesser of the two evils.”