Liam McAlpine died in Glenrothes, Fife, on Sunday.
His death comes after he apparently posted a video to YouTube in which he revealed he was gay.
In a nother video he speaks of being “bullied”.
The boy’s school paid tribute to the “cheerful, pleasant and likeable” pupil, and said they had a robust anti-bullying policy.
Avril McNeill, headteacher of Glenrothes High School, said: “We are all deeply saddened by the news of Liam’s death and our thoughts are with his family at this difficult time.
“Liam was a cheerful, pleasant and likeable pupil with an excellent attendance record at school.
“He will be missed within our school community.
“Our guidance teachers, psychological and community chaplaincy teams are on hand to offer support to any pupils or staff who may need it.
“We have a robust anti- bullying policy at Glenrothes High School. Bullying in any form is unacceptable and we have a number of systems in place to support children and help them to feel safe.
“I would urge anyone who is feeling threatened or vulnerable to report this to someone they trust.”
Police Scotland said Liam’s death was being treated as “unexplained” and investigations were continuing. His death comes after Police Scotland and NHS Fife issued a warning to parents of all secondary-school pupils in Glenrothes about the circulation of prescription drugs in the area.
It said: “It is never safe to take someone else’s medicine.”