Yeah, I might have understood it more if the teacher has no parents or no one to run to. How did they raise him? Do they even know what is really happening to him during those times when he is addicted to gambling? They are the first wall that should stop it or seek help for him.
Then, he is a teacher, so how come? That's even harder to explain when his profession is to teach. For me, teachers are mostly with optimistic minds and with lots of patience so that makes me more confused with how it ended up with suicide.
Gambling addiction is applicable to all the people who plays gambling, even if you're a teacher, a doctor, an engineer, or whatever profession you do have, we're just humans, we have emotions that we canty control most of the time. My guess was that he is hight indebted to someone, I mean like a loanshark, that warned him already that if he didn't pay up on time, something would happen.
Or the other reason is that he is just depressed and stressed on how he will get back his losses, but it turned out not pretty well, so he decided to end his own life which is not really the right choice.