I can understand the frustration when teachers behave badly and set a bad example. But look at it this way that school is a place where we learn the lesson at two levels. First is about the subjects that we learn in classes. The second, and most important, are the lessons of life that we learn through the interactions with teachers, friends and others, how we take success and failures and how we develop certain faculties, qualities and capacities needed for life.
Coming to the teacher we have to totally ignore his bad words, anger etc. People insult us only if we accept their insult. But if we just brush it off saying that we are not what he is saying about me then it stops affecting us. The purpose of the teacher is to facilitate learning. Take whatever he can give but learn to do more and more self reading. Now so much good material and good books are available on every subject. Learn from these alternate sources. If time is less than increase concentration. By increasing our concentration we can learn the same subject much faster.
Have confidence and I am sure you can learn in less time and do well.
Lots of love
Alok Da