Depression is characterized by a significant and persistent decline in mood and is currently a major threat to physical and mental health. Traditional Chinese medicine can effectively treat depression with few adverse effects. Therefore, this study aimed to examine the use of reverse network pharmacology and computer simulations to identify effective ingredients and herbs for treating depression. Differentially expressed genes associated with depression were obtained from the Gene Expression Omnibus database, after which enrichment analyses were performed. A protein-protein interaction network was constructed using the STRING database to screen core targets. The Traditional Chinese Medicine Systems Pharmacology Database and Analysis Platform database was used to screen ingredients related to these core targets, and the core ingredients were screened by constructing the “Targets-Ingredients-Herbs” network. Drug evaluation analysis was performed using the SwissADME and ADMETlab platforms, according to Lipinski Rule of 5. The binding between the targets and ingredients was simulated using molecular docking software. The binding stability was determined using molecular dynamics analysis. The “Ingredients-Herbs” network was constructed, and we annotated it for its characteristics and meridians. Finally, the selected herbs were classified to determine the formulation for treating depression in traditional Chinese medicine. The pathogenesis of depression was associated with changes in SPP1, Plasminogen activator inhibitor 1, CCNB1 protein, CCL3, and other genes. Computer simulations have verified the use of quercetin, luteolin, apigenin, and other ingredients as drugs for treating depression. Most of the top 10 herbs containing these ingredients were attributed to the liver meridian, and their taste was symplectic. Perilla Frutescen, Cyperi Rhizoma, and Linderae Radix, the main components of “Tianxiang Zhengqi Powder,” can treat depression owing to Qi stagnation. Epimedium and Citicola, the main traditional Chinese herbs in “Wenshen Yiqi Decoction,” have a positive effect on depression of the Yang asthenia type. Fructus Ligustri Lucidi and Ecliptae Herba are from the classic prescription “Erzhi Pills” and can treat depression of the Yin deficiency type. This study identified the key targets and effective medicinal herbs for treating depression. It provides herbal blend references for treating different types of depression according to the theory of traditional Chinese medicine.