He's not wrong. This girl probably needs therapy, but it's not a teacher's job to be a therapist. It happens in manga, but it's not really advisable in real life. A teacher isn't really trained for it. Providing some simple life guidance is one thing, but this girl seems like she's one step away from the edge if she's getting naked and throwing herself at him. Maintaining a professional boundary with his students is wise, but there also ought to be channels he can use to escalate this issue to someone who is equipped to deal with in a proper way, and I suspect there isn't given the state of mental health care options in Japan.