This study examines how confinement measures established during the COVID-19 pandemic crisis affected the emotions of the population. For this purpose, public sentiment on social media and digital ecosystems in Spain is analyzed. We identified affective tones towards media and citizens published on social media focusing on six basic emotions: anger, fear, joy, sadness, disgust and uncertainty. The main contribution of this work is the evidence of contagious sentiments and, consequently, the possibility of using this new dimension of social media as a form of a “collective therapy”. This paper contributes to understanding the impact of confinement measures in a pandemic from the point of view of emotional health. This analysis provides a set of practical implications that can guide conceptual and empirical work in health crisis management with an alternative approach, especially useful for decision-making processes facing emergency responses and health crises, even in an unprecedented global health crisis such as the traumatic events caused by the COVID-19 disease.