We had an otherwise healthy cat start vomiting foamy liquid and stop eating when he was about 8 years old. Vet did not diagnose what yours did though as far as we remember. We thought maybe it was just a hairball but he never coughed one up.
Wife recalls they gave him anti-nausea pills and some shots, and eventually he started eating again. Today he eats a huge amount again and we are starting to have to control it.
If they give your kitty the anti-nausea meds and he starts eating again, he may well improve.
The tips on chicken or turkey baby food are good, just get the stuff without vegetables added in.