The global coronavirus pandemic and lockdown has had negative impacts on individuals’ mental health and well-being. The crisis has generated symptoms of depression in many, which may last even after the lockdown is over. To provide support to individuals in terms of counseling and psychiatric treatment, it is necessary to identify such depressive symptoms in a timely fashion. To address this problem, an artificial intelligence-based system is proposed to assess the changes, if any, in the mental health of an individual as a function of time, starting from the pre-lockdown period (in India from 20 April 2020). A Mental Health Analyzer has been implemented to automatically detect whether an individual is trending toward a state of depression based on his or her tweets over time. The deep learning models of Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM), and Bidirectional LSTM have been implemented and compared for the emotion classification task, specifically to detect the emotions of sadness, fear, anger, and joy present in a person’s tweets. The system identifies the emotion of sadness present in tweets to detect depression. An ensemble maximizing model using CNN, LSTM, and Bidirectional LSTM is proposed to maximize the recall metric to improve the performance for the task of depression detection. The implemented system was tested using the dataset provided for the SemEval-2018 semantic evaluation tasks and achieves better results than previous models for the task of emotion classification and, further, can detect depression when tested on real Twitter data. © 2022 J. Adv. Inf. Technol.