When you mess up, you have to remind yourself that its just one day and that you can always fix whatever went wrong in the next days ahead. You make an effort to do better next time and dont beat yourself up for being human. The small amount of weight or water weight you would have gained by eating that food wasnt serious enough for you to get so worked up over and throw up. The goal is to be healthy, not create an eating disorder. Purging like that wasnt the best decision in regards to your wellbeing--both physically and mentally. If you eat something, just accept the fact that you ate it and move on. If you stick to healthy habits 85 to 90% of the time, you will reach the goal you are after. Just be patient and dont get upset over the little mistakes. We all mess up sometimes.