To address the lack of publicly available data for modeling effective dialogue models in psychological counseling human-machine dialogues, a psychological counseling dialogue dataset was constructed for dialogue generation and mental disorder detection. Firstly, a multi-round dialogue dataset containing 3 268 doctor-patient conversations was collected from an online medical consultation platform, enriched with comprehensive metadata including hospital affiliations, medical departments, disease categories, and patient self-descriptions. Secondly, a knowledge-enhanced dialogue model named Empathy Bidirectional and Auto-Regressive Transformers (EmBART) was proposed to enhance the empathic capabilities of the dialogue model. Finally, an experimental evaluation of the dataset usability was conducted through psychological response generation and mental disorder detection tasks. In psychological response generation, EmBART trained on this dataset performed excellently on all metrics in both automatic and human evaluations, with the perplexity reduced by 2.31 compared to baseline model CDial-GPT(Chinese Dialogue Generative Pre-trained Transformer). In mental disorder detection, CPT (Chinese Pre-trained unbalanced Transformer) and RoBERTa (Robustly optimized Bidirectional Encoder Representations from Transformers approach) trained on this dataset demonstrated outstanding mental disorder prediction capabilities. Experimental results confirm the strong utility of this dataset in generating empathic dialogues and detecting mental disorders, providing a data base for future research on psychological counseling human-machine dialogues.