I hope your cat is getting better very soon.
Two of mine were vomiting white foam as well for a while and I changed their food.
The dry-food is now diet-food for sterilized cats from the vet and they do not vomit anymore.
The can-meat is from a better brand as well than before.
They get raw meat and cat-gras from time to time for enzymes.
A study of a population of 900 cats spread over 4 generations has shown that the population of cats only being fed processed food with no content of enzymes (enzymes get destroyed at temperatures from 35°Celsius on meaning that processed food has no content of enzymes) had each following generation a decreasing health and degenerative conditions like cancer, allergies, blindness etc.
The cats being fed a higher amount of non-processed food (raw) had an overall good and over the generations constant health.
_________________
English is not my native language, so I will very likely do mistakes in writing or understanding. My edits are due to corrections of mistakes, which I sometimes recognize just after submitting a text.