Often what’s happening is the dog eats, feel pukey. Associates pukey feeling with that type of food. Maybe won’t eat at all for a little bit, then gets hungry enough to try, but won’t eat the food from the last meal. Tries something new, feels pukey. Now refuses that food.
The solution isn’t to just keep offering, it’s to treat the nausea. Unremitting nausea is a quality of life issue, IMO, and worth a call to the vet for some Cerenia. I’d also request Zofran, because I’ve found they work well together. Cerenia also works well to treat visceral pain, which it sounds like you may have here.
Good luck–I hope you’re able to get him on some meds today and that he starts feeling better soon.