Research has shown that people who gamble have higher risk of suicidal thoughts and suicide attempts. The researchers employed 40 biological, psychological, social, and socio-demographic factors to predict the risk among people who gamble using a machine learning approach. The performance of four machine learning models was compared. Random forest was found to be the best model in predicting suicidal thoughts, while XGBoost showed the best performance in predicting suicide attempts. Across the models, dissociation, depression, and anxiety were identified as the most important predictors of suicidal thoughts. Depression and rumination were the most important predictors of suicide attempts.