Recent research has shown that virtual agent able to express empathic emotions enhances human-machine interaction. In this paper, we present the capabilities that virtual agent should have to be empathic toward a user. Moreover, we propose a computational representation of emotions which may be experienced by a user during a human-machine dialog. This semantically grounded formal representation enables a rational dialog agent to identify from a dialogical situation the empathic emotion and its intensity that he should express. Key words: Computational model of emotion, empathy, rational dialog agent