Recent research has shown that virtual agents expressing empathic emotions toward users have the potentiality to enhance human-machine interaction. To provide empathic capabilities to a rational dialog agent, we propose a formal model of emotions based on an empirical and theoretical analysis of the users’ conditions of emotions elicitation. The emotions are represented by particular agent’s mental states composed of beliefs, uncertainties and intentions. This semantically grounded formal representation enables a rational dialog agent to identify from a dialogical situation the empathic emotion that it should express. An implementation and an evaluation of an empathic rational dialog agent have enabled us to validate the proposed model of emotions.