The article aims to model the COVID-19 mortality in EU member states. It depends on chosen factors, determine the ranking of factors' importance and attempts for their reduction. Further objectives include identifying states with similar values of identified factors and their geographical concentration. This is exploratory research and is a quantitative research study according to the type of data used. Using the supervised machine learning random forest algorithm, we predict the number of COVID-19 deaths depending on analyzed factors. From 23 factors, we choose the seven most important factors. This selection is based on the highest value, Inc Node Purity. The cluster analysis is used to create groups of states with similar values of chosen factors. Because of the nonuniform methodology of reported deaths, we use excess mortality to measure COVID-19 mortality. The most important factor influencing COVID-19 mortality is the death rate due to circulatory system diseases. The second most significant factor is the avoidable mortality. The third most relevant factor is GDP per capita in purchasing power parity. Similar values of analyzed factors can be found in Bulgaria, Romania, the Czech Republic, Poland, Slovakia, Lithuania, Hungary, Croatia, and Latvia. COVID-19 mortality in these countries is almost three times higher than in the rest of the EU. Decision-makers could use the gained findings to decrease inequalities in the field of healthcare, mostly through efficient interventions in public healthcare and primary prevention. The results demonstrate that more investment in promoting health in the future will be necessary in the cohesion policy framework.