That has to hurt even more. You try to do the best for a pet, and it turns out badly.
One lesson I learned was if what your doing is working stick with it even if there are just a few general concerns. He only saw a vet twice before the last time and the only reason I took him was because he lost almost all his teeth over the last couple years but I should have realized it wasn't bothering him while eating.
We had to have our half-Korat put to sleep recently, over something like what you mention. He'd had a severe reaction to a product (not the food in question) and apparently had long term brain damage...he would go from being his loving self to a berserk ball of claws and rage with no provocation. Any other time he was amazingly gentle and lovey...he'd let us use him as a kitty pillow and just purr and purr.
After 3 of those in 2 weeks and he finally sent my mother to the ER for stitches, it was time for the final vet visit. He was only about 4 years old :-(
In the end a product meant to protect him caused all that.