I did keep rats as pets until very recently(only did not replace the 'pet' rats because of time/space issues). I also bred most of the pet rats, and fed rats to the snakes/lizards.
I really did not have any issue, becuase I did treat the feeder rats just as good as the 'pet' rats or the breeder rats. I used to have chickens, and I loved chickens, but also had no real issue with killing and butchering the chickens either.
I did always have a couple here and there, that never got killed for food, but if they died of natural causes(as happens with both) then they became food for other critters without qualm.
I eat meat. I eat goats, and chickens, and cows... and fish and such... and my snake eats rats. If rats had more meat on them, I'd probably eat rats too. I'm pretty much an omnivore. I've raised(or helped to raise) meat animals(including cows, goats, chickens, rabbits) and killed them for food.
Somehow.. I would draw the line at a dog or cat.. but not at a rat or rabbit or bird. Yes, it's a little hypocritical, but dogs and cats have no purpose as food items in my culture(I understand other cultures eat them, but it's not my typical culture), so perhaps they get a 'free pass'.