Motivated by the Covid-19 epidemic, we build a SIR model with private decisions on social distancing and population heterogeneity in terms of infection-induced fatality rates, and calibrate it to UK data to understand the quantitative importance of these assumptions. Compared to our model, the calibrated benchmark version with constant mean contact rate significantly over-predicts the mean contact rate, the death toll, herd immunity and prevalence peak. Instead, the calibrated counterfactual version with endogenous social distancing but no heterogeneity massively under-predicts these statistics. We use our calibrated model to understand how the impact of mitigating policies on the epidemic may depend on the responses these policies induce across the various population segments. We find that policies that shut down some of the essential sectors have a stronger impact on the death toll than on infections and herd immunity compared to policies that shut down non-essential sectors. Furthermore, there might not be an after-wave after policies that shut down some of the essential sectors are lifted. Restrictions on social distancing can generate welfare gains relative to the case of no intervention. Milder but longer restrictions on less essential activities might be better in terms of these welfare gains than stricter but shorter restrictions, whereas the opposite might be the case for restrictions on more essential activities. Finally, shutting down some of the more essential sectors might generate larger welfare gains than shutting down the less essential sectors.