  We present a lattice computation of the isospin-breaking corrections to
pseudoscalar meson masses using the gauge configurations produced by the
European Twisted Mass collaboration with $N_f = 2 + 1 + 1$ dynamical quarks at
three values of the lattice spacing ($a \simeq 0.062, 0.082$ and $0.089$ fm)
with pion masses in the range $M_\pi \simeq 210 - 450$ MeV. The strange and
charm quark masses are tuned at their physical values. We adopt the RM123
method based on the combined expansion of the path integral in powers of the
$d$- and $u$-quark mass difference ($\widehat{m}_d - \widehat{m}_u$) and of the
electromagnetic coupling $\alpha_{em}$. Within the quenched QED approximation,
which neglects the effects of the sea-quark charges, and after the
extrapolations to the physical pion mass and to the continuum and infinite
volume limits, we provide results for the pion, kaon and (for the first time)
charmed-meson mass splittings, for the prescription-dependent parameters
$\epsilon_{\pi^0}$, $\epsilon_\gamma(\overline{MS}, 2~\mbox{GeV})$,
$\epsilon_{K^0}(\overline{MS}, 2~\mbox{GeV})$, related to the violations of the
Dashen's theorem, and for the light quark mass difference $(\widehat{m}_d -
\widehat{m}_u)(\overline{MS}, 2~\mbox{GeV})$.
