Compactness methods are a powerful tool in the modern theory of PDEs and they are often use to achieve optimal regularity. I will present a classical Lemma of De Giorgi on the harmonic approximation and show some generalizations towards partial regularity results for solutions of nonlinear elliptic systems or minimizers of quasiconvex functionals.