Understanding the impact of collective social phenomena in epidemic dynamics is a crucial task to effectively contain the disease spread. In this work, we build a mathematical description for assessing the interplay between opinion polarization and the evolution of a disease. The proposed kinetic approach describes the evolution of aggregate quantities characterizing the agents belonging to epidemiologically relevant states and will show that the spread of the disease is closely related to consensus dynamics distribution in which opinion polarization may emerge. In the present modelling framework, microscopic consensus formation dynamics can be linked to macroscopic epidemic trends to trigger the collective adherence to protective measures. We conduct numerical investigations which confirm the ability of the model to describe different phenomena related to the spread of an epidemic.