Hairballs are a common cause of vomiting in cats but not the only cause. The hairball remedy and diet are good and certainly worth trying. Usually this will solve the problem. It’s well worthwhile continuing the diet and 8 in 1 until this is sorted out. In fact you should continue the hairball diet long term
The significant thing with your cat is that his vomitus is “white foam”. This will be predominantly swallowed saliva and mucus. So it’s not usually an indication of a severe gastritis or metabolic upset. This is born out by the fact that he still seems quite bright.
He may still be suffering from a mild gastritis. Bacterial gastritis is common in cats. This is caused by a stomach bacteria called Helicobacter felis and it can cause intermittent or regular vomiting episodes in an otherwise well cat. However usually we will see food vomited back as well. If he never vomits up food bacterial gastritis is less likely.
Now the other strong possibility is that this may actually be an issue in the throat rather than the stomach. Inflammation of the throat is not uncommon in cats. It can be allergic or infective. In particular allergic pharyngitis won’t cause the patient to be unwell. When the throat is inflamed there will be an increase in mucus and this is swallowed with saliva. Cats will often regurgitate this back.
It’s worthwhile having him checked by your vet. However because he’s so well otherwise it might be worth trying an anti-histamine. This will suppress an allergic pharyngitis. You can use the human medication Benadryl Allergy (diphenhydramine). Ensure it is not the combination product (Benadryl Allergy and Sinus). The dose is 1-2 mg/lb and you repeat it every 8 hours. If he responds to that you can be sure it’s inflammatory. If not then get your vet to examine him.
I hope I’ve been of help.
Kindest regards, Peter