Does vomiting follows the consumption of a certain food? Are you aware of the medical studies posted that make a connection between autism and milk or gluten allergy? Usually those children have constipation or even loose stools as well
Vomiting can be a neurological symtom, a neurlogical exam and possibly an MRI would be helpful. Does he have headaches? Being autistic could some of his "behaviors" (like banging his head) be a reaction to a headache?
Whatever your son does to enjoy himself, relax, etc. would be worth pursuing at such times. In other words, the goal would be to help him relax and allay the anxiety. Vomiting generally does not have much of a psychological component - it is almost always brought on by a medical condition. Having said that, it is sensible to try to reduce the anxiety he experiences once an episode of vomiting occurs, and to the extent that goal can be reached he might not have such an acute or protracted response.