To the aim of constructing effective human-AI teams, that can be useful for improving caregiving in medicine and enhancing human performance also in other sectors (i.e., teaching), agents which interact with humans should be endowed with an emotion recognition and management module, capable of empathy, and of modeling aspects of the Theory of Mind, in the sense of being able to reconstruct what someone is thinking or feeling. In this paper, we propose an architecture for such a module, based upon an enhanced notion of Behavior Trees. We illustrate the effectiveness of the proposed architecture on a significant example and on a wider case study.