Sorry to hear of your unexpected lesson. Been there and did that in my first season at age 50. I turned in to a gravel and sand parking lot and as soon as the back end touched, down I went. Absolutely no warning. It was the first time I had worn a full face and as luck would have it I smacked my chin and it saved my jaw for sure as my bell rang pretty good. I got trapped under it too and luckily again, I had on leather pants and calf high boots or the hot exhaust pipe would have branded me.
After the fact, I remembered someone glossing over gravel in my course but after that episode I made a point of learning all I could and became much more aware of road conditions and hazards. To help, I found David L. Hough's two volume set, "Proficient Motorcycling" to be invaluable (around $25 each at all good bookstores). Its the absolute gold standard in street rider education and I read mine every winter before the start of the next season.
Its good that you have a level headed approach to this. Riding is a life long learning curve and you just picked up one of the most important lessons. Now you have to get your confidence back up so get that bike repaired, as soon as you can, and get your *** back in the saddle. Be aware of gravel and road hazards but don't get paranoid. Being paranoid leads to tension and that can lead to other accidents. Ride, learn and enjoy.
Good luck and cheers,
Spyug