Mental and cognitive well-being is of paramount significance for human beings. Consequently, the early detection of issues that may culminate in conditions such as depression holds great importance in averting adverse outcomes for individuals. Depression, a prevalent mental health disorder, can severely impact an individual’s quality of life. Timely identification and intervention are critical to prevent its progression. Our research delves into the application of Machine Learning (ML) and Deep Learning (DL) techniques to potentially facilitate the early recognition of depressive tendencies. By leveraging the cognitive triad theory, which encapsulates negative self-perception, a pessimistic outlook on the world, and a bleak vision of the future, we aim to develop predictive models that can assist in identifying individuals at risk. In this regard, we selected The Cognitive Triad Dataset, which takes into account six different categories that encapsulate negative and positive postures about three different contexts: self context, future context and world context. Our proposal achieved great performance, by relying on a strict preprocessing analysis, which led to the models obtaining an accuracy value of 0.97 when classifying aspect contexts; 0.95 when classifying sentiment-aspects; and a value of 0.93 in accuracy was achieved under the aspect-sentiment paradigm. Our models outperformed those reported in the literature.