My friend's son does this, although he is only 3 now. He makes himself sick whenever he doesn't get his own way. I guess it's sort of his way of throwing a tantrum. The doctor said that he has a very sensitive mechanism for throwing up (I can't remember what it is called, sorry) so that he can just do it "on demand." My friend has been told by the doctor that there is nothing to be done but to ignore it like any other tantrum and hopefully he will grow out of it. (HAH! Like you can ignore a kid throwing up!) Apparently, as kids get older their mechanism tightens and it may make it more difficult for them to throw up on demand.
Your daughters issues do sound like they started when she wanted attention (during the storm). My daughter also would throw up when she cried very hard or wanted attention. It took a lot of time and patience, but she did finally get over it. We had to warn her that she would get sent to bed with no attention if she threw up (because if you throw up you must be sick and need rest), but that she could spend time with us if she did not. Also, we felt that it was important to give her lots of positive attention when she was around.
I agree that your daughter has missed a lot of school, which could only be making things worse for her and making it more difficult for her to return to school. Tell your daughter that she will be going to school whether she throws up or not. Maybe even include a special prize for not throwing up (like stickers on a chart with a prize when she reaches a goal) to help encourage her to stop. Tell her how proud you will be when she reaches her goal, and give her lots of positive praise for what an amazing kid she is. Also, tell her how important it is that she attend school to learn new things so that one day she will be able to be a good mommy just like you are!