The COVID-19 pandemic has led to different health outcomes, including long COVID (LCo) and mental health (MH) disorders, impacting millions globally. To enable early healthcare diagnosis, including the prediction of MH conditions and LCo, various research studies have utilized machine learning (ML) techniques. However, there is still a gap in understanding the mental health of recovered COVID-19 patients with long COVID using ML techniques. This study aims to bridge this gap by developing and evaluating ML models, including support vector machine, multilayer perceptron (MLP), k-nearest neighbor, gradient boosting, voting classifier, and extreme gradient boosting, tailored for mental health and long COVID datasets from recovered COVID-19 patients. Additionally, feature selection methods, e.g., Recursive Feature Elimination (RFE) and Extra Trees (ET), and optimized models with hyper-parameter tuning will be employed. Our experiments utilize the dataset of recovered COVID-19 patients. Among these ML models, the MLP with ET-based features achieved the highest accuracy and AUC scores in this dataset, with 1.00 and 0.97 ± 0.02, respectively. The research reveals the high prevalence and risk factors of mental health disorders and long COVID from the dataset. These findings will contribute to personalized healthcare strategies for individuals navigating the complexities of post-COVID-19 recovery, integrating machine learning insights into mental health and long COVID support.