In the field of machine learning for sentiment segmentation, the suicidal tendency analysis shown in social media posts is an extremely valuable research topic. Our research objective is: In the sentiment segmentation of social media posts with pessimistic tendencies, which models can most accurately predict whether a person has a high suicidal tendency. We used a dataset from Kaggle, with 232,074 posts. Each post has a label: suicide or non-suicide. Posts are from Reddit, December 2008 to January 2021. We first performed a series of language processing for all the text in Post. Then we trained LSTM, GRU, bidirectional LSTM and GRU, logistic Classifier, SVM, XGBoost, and LGBM for sentiment classification. Compared the pros and cons of each model, one-way LSTM reached the highest accuracy rate (92.4%). Through experiments, we know that the accuracy of sentiment segmentation of RNNs with time series is higher than that of ordinary machine learning models and simple RNN. This may be due to their ability to deal with long-term context memory.