Depressive disorders (including major depressive disorder and dysthymia) and anxiety (generalized anxiety disorder or GAD) disorders are the two most prevalent mental illnesses. Early diagnosis of these afflictions can lead to cost-effective treatment with a better outcome prospectus. With the advent of digital technology and platforms, people express themselves by various means, such as social media posts, blogs, journals, instant messaging services, etc. Text remains the most common and convenient form of expression. Therefore, it can be used to predict the onset of anxiety and depression. Scopus and Web of Science (WoS) databases were used to retrieve the relevant literature using a set of predefined search strings. Irrelevant publications were filtered using multiple criteria. The research meta data was subsequently analyzed using the Biblioshiny Tool of R. Finally, a comparative analysis of most suitable documents is presented. A total of 103 documents were used for bibliometric mapping in terms of research outcome over the past years, productivity of authors, institutions, and countries, collaborations, trend topics, keyword co-occurrence, etc. Neural networks and support vector machines are the most popular ML techniques; word embeddings are extensively used for text representations. There is a shift toward using multiple modalities. SVM, Naive Bayes, and LSTM are the most used ML methods; social media is the most used source of data (Twitter is the most common platform); and audio is the most used modality that is combined with text for depressive and anxiety disorders (DAD) detection. Text data provides good cues for the detection of DAD using machine learning. However, the findings in most of the cases are based on a limited amount of data. Using large amounts of data with other modalities can help develop more generalized DAD-detection systems. Asian countries are leading in the research output with China and India being the top countries in terms of the number of research publications. However, more international collaborations are needed. Limited research exists for anxiety disorders. Co-occurrence of anxiety and depressive disorders is high (33% of studies).