Can a sick pet eat food that would otherwise be forbidden?
I have heard that when dietary laws and serious medical conditions interact, there are grounds to be lenient on the basis of pikuach nefesh. I'm pretty sure I've heard this with respect to ingredients, for example if the medicine you need has gelatin in it, and I've definitely heard this with respect to eating on fast days when medically necessary.
That's for people, though. My question is whether such leniencies also apply to pets. Pets don't fast, of course, but some pet foods contain mixtures of meat and milk, and if they are cooked a Jew can't benefit from them. That's usually fine; there is enough variety in pet-food offerings to be able to find something (setting aside Pesach). But sometimes a pet has a medical condition requiring special food, and in these cases the options can be very limited.
If one's pet needs a food that would normally be forbidden to benefit from, but the need is medical and not a mere preference, may a Jew feed the pet that food? Or must the owner find another solution, such as preparing homemade food instead of buying commercial pet food?
(I do have a pet, but this is a theoretical question. I'm not looking for p'sak.)