hi moo
im a 38 yr old guy but i go through exactly the same thing that you do. it started when i was doing my A levels and i lost all confidence thinking i had no chance of passing them. i tried to leave college but the teachers helped me through it and i eventually passed them with flying colours.
every now and again i have a little wobble and cant think straight for worrying so much, cant sleep and then cant eat because i make myself feel so sick, is awful, feels like im on the edge of a nervous breakdown.
its usually triggered off my having to make an important decision that could change the course of my life (or so i think) like changing careers or relationship problems.
i get around it by ducking out of making decisions and always taking the safe option. thats unfortunately always held me back in life and stopped me fulfilling my potential which is something you must not do.
go and see your teachers, see your doctor, see a therapist, get all the help on offer to get over what is a crisis of confidence, dont do what i do and bury your head in the sand.