A Bronx public school teacher was found dead of an apparent drug overdose Thursday inside the school where he worked, police said.

The 36-year-old educator was discovered on the floor of a bathroom inside Public School X811 in Crotona Park, a special education school, just before 6 p.m. His body was found lying next to an envelope filled with an unidentified substance and a needle cap.

He had last been seen at the Longfellow Avenue school earlier that afternoon, cops said.

The school is attended by students in grades 6 through 12.

The man’s identity has not been released pending family notification. The medical examiner will determine the official cause of death.