The phenomenon of teenage campus suicide has become the focus of attention of parents, schools and the society. The causes behind it are extremely complicated, and the root cause is psychological and spiritual problems. However, one's negative psychology is often hidden, and it is difficult to detect and effectively intervene before the tragedy. How to effectively identify students with suicidal tendencies in order to prevent tragedies has aroused extensive research and discussion among the government, academia and the public. Through investigation and research, it is found that the current popular computer cutting-edge technologies such as artificial intelligence and computer vision can be well used for human emotion recognition and behavior prediction, and put into use in schools as a mental health auxiliary diagnosis and treatment system, thus effectively reducing the suicide rate on campus. The scenario assumes that machine learning can be used to deduce the risk of psychological problems in human samples by analyzing the frequency of negative emotions in facial expressions. Based on this, this paper proposes an effective solution for campus suicide prediction, and designs a set of auxiliary diagnosis and treatment system based on campus monitoring network system for suicide behavior prediction and student mental health analysis. Through preliminary experimental analysis and verification, the suicide psychological auxiliary diagnosis and treatment system has achieved good results in face recognition success rate, emotion recognition success rate and behavior prediction success rate. With the input of more experimental data and the increase of self-training time, the prediction system will perform better.