There IS a connection between gaming and depression, but only when combined with other types of stress, like educational or social preassure. This means that gaming can make an ongoing depression worse, but not cause depression on its own.
If your teacher is being oppressive and abusive, I suggest that you talk with your parents about it.