I was not there when that happened to you and I might be wrong but I cannot imagine that happening under normal circumstances. I used to race and during many thousand kilometers on the road I encountered many risky situations (including a car appearing out of nowhere if front of me while I was going down the hill on multiple occasions) and I am afraid of many things while I am on a bike. But I have to say that going over handlebars because of braking is not one of them. If I could venture a guess I would say that something might be wrong with your bike - bad geometry (some cheap/old bikes are unstable), tyres not pressurized enough, really bad brakes (front one working, back one not working) - if I were you I would make sure that my bike is safe. By any chance did you have a heavy backpack on your back? Or maybe you just panicked and did something you really should not do... like braking really hard with only your front brake? Please check your bike anyway.