One can find some applications in Arthur Besse's book "Einstein manifolds", $\S6\ D$.
Proposition. If a closed manifold $M^4$ admits an Einstein metric, then $\chi(M)\ge 0$. Moreover $\chi(M)=0$ iff $M$ admits a flat metric.
Proof. Since $Rc(g)=\lambda g$, we have $|Rc|^2=4\lambda^2=r^2/4$. This implies $\chi(M)=1/32\pi^2 \int|Rm|^2dV\ge 0$ with equality iff $Rm=0$. $\square$
Combining with another formula for the signature of a 4-manifold $$ \sigma(M)=\frac{1}{12\pi^2}\int_M(|W_+|^2-|W_-|^2)dV, $$ where $W_{\pm}$ are compontens of the Weyl tensor, one can prove a stronger inequality: for a closed Einstein manifold $M^4$ $$ \chi(M)\ge 3/2|\sigma(M)|. $$
The equality case was studied by Nigel Hitchin, Compact four-dimensional Einstein manifolds, (1974). HeHe proved that if $(M^4, g)$ is an Einstein manifold with $\chi(M)= 3/2|\sigma(M)|$, then $M$ is Ricci flat and either universal cover of $M$ is K3-surface, or $M$ is flat.
These are important results, since topological obstructions for the existence of Einstein metrics are very scarce. In particular in dimensions $\ge 5$ there are no known such obstructions.