With the evolution of several online platforms for information sharing such as social media, blogs, product review sites, and discussion forums, people have become more proactive in sharing their expectations, views, feelings, and experiences. This large amount of emotionally wrapped data motivates many researchers to perform data mining and present the crux of hidden emotions or mental states in a more presentable and comprehensible manner. It has several applications in different domains such as business, education, psychology, politics, and many more. This paper presents a detailed literature review projected to rigorously analyze the existing approaches to identify the mental or emotional state of a person from unstructured textual data. We include the most relevant papers which were published during 2001-2022. The selected papers are classified into three categories: granularity level, contextual level, and cognition level. Each category is carefully analyzed followed by a detailed and critical discussion. Finally, open challenges, opportunities, applications, and future directives are presented in-depth to facilitate the researchers working in the domain of emotion mining.