In physical education teaching, teachers should strive to find teaching opportunities, create teaching environment, actively infiltrate mental health education, strengthen mental health education for students, help middle school students solve various psychological problems, cultivate their good personality and psychological quality, let students learn to learn to learn and live, improve their ability to adapt to social life, promote the coordinated development of psychological quality with ideological and moral, scientific culture and physical quality, and become people with strong social adaptability and sound development.