The effectiveness of Cognitive Behavioural Therapy (CBT) for overcoming the irrational thought patterns that give rise to mental disorders is a known fact but pinpointing the cognitive pathways accurately for personalized treatment is the key. The advent of social media has made it possible for people to express their negative emotions, in a way that they disclose their cognitive distortions, and in the case of severe forms, manifest suicidal tendencies. Nevertheless, the techniques developed to analyze these lines of cognitive pathway are lacking hence, psychotherapists will have to wait until the symptoms get worse before they are able to act on time and with the right tools and methods, online environments will become a reality where they are the first to intervene in the situation. Decision Tree and Random Forest are the primary Hierarchical Text Classification models. They help the system for separating inputs from the users into the different cognitive pathways and simultaneously for detecting the negative thought pattern with the aid of these models. To be more specific, for the extraction of negative sentiment and only of that kind, the system is built with BERT for sentiment analysis in social media data. This system goes beyond the available ones by covering not only the negative thoughts but also predicting some subcategories within the negative and other physical as well as mental health categories. This update allows the understanding of the problems and also gives a basis for early detection and treatment to the psychotherapists in the form of psychological and mental health issues intervention and therefore helps in the prediction of social-emotional patterns.