 Depression is a common mental illness worldwide, with potentially serious consequences if left untreated. Early identification and treatment are difficult due to the lack of reliable diagnostic markers. Furthermore, depression is often associated with thoughts of suicide, making it even more important to identify and treat it quickly. To address these issues, we propose a new approach based on a combination of particle swarm optimization and cuckoo search algorithms. This approach was tested against several existing machine learning techniques, including KNN, SVR, and decision trees, as well as ResNet, VGG, and Lennet. Our results showed that the proposed method outperforms all other models, achieving an accuracy of 99.5%. This article was authored by Curram Jawad, Rajulmato, Ariandas, and others.