  Emotional Support Conversation (ESC) systems are pivotal in providing
empathetic interactions, aiding users through negative emotional states by
understanding and addressing their unique experiences. In this paper, we tackle
two key challenges in ESC: enhancing contextually relevant and empathetic
response generation through dynamic demonstration retrieval, and advancing
cognitive understanding to grasp implicit mental states comprehensively. We
introduce Dynamic Demonstration Retrieval and Cognitive-Aspect Situation
Understanding (\ourwork), a novel approach that synergizes these elements to
improve the quality of support provided in ESCs. By leveraging in-context
learning and persona information, we introduce an innovative retrieval
mechanism that selects informative and personalized demonstration pairs. We
also propose a cognitive understanding module that utilizes four cognitive
relationships from the ATOMIC knowledge source to deepen situational awareness
of help-seekers' mental states. Our supportive decoder integrates information
from diverse knowledge sources, underpinning response generation that is both
empathetic and cognitively aware. The effectiveness of \ourwork is demonstrated
through extensive automatic and human evaluations, revealing substantial
improvements over numerous state-of-the-art models, with up to 13.79\%
enhancement in overall performance of ten metrics. Our codes are available for
public access to facilitate further research and development.
