What would you do about this from a teacher's perspective?

I have this student. Age group 12-13. 7th grader. He is one of those who has hit puberty earlier but he still acts like a child overall. He loved me a lot at first. We even chatted outside of school and he had formed a bond with me. He shared the moment he was saddest, he would say things like "you are my favorite teacher, I would like to introduce my first girlfriend to you" so we were joking around and so on. Then he started saying things like "I wish I was your age" and started complimenting me. I wouldn't offend him so I'd tell him he's very sweet and would continue to remind him that I am his teacher. Then he started comparing himself to the girls in his class. He started saying things like "You never hug us boys like you hug girls." So I hugged him one day and he was like "no, you don't have to" at first but then he wanted to hug. Then he said something like "I don't hug everyone, I put my feelings into it when I hugged you." So he was forming an emotional bond with me. Then he slowly started comparing himself to the other boys. He started saying things like "you don't like me, you discriminate" and he suddenly pulled back. He had always attended my classes and never missed his homework, but in the last two weeks he has been quiet, sleeping and has missed his homework for the first time. When I try to talk to him he brushes me off and says he doesn't want to talk to me. I don't know what to do about this. Is he trying to protect himself because he has a crush on me and knows it's not right? What would you do about this from a teacher's perspective?

What would you do about this from a teacher's perspective?
Post Opinion