We derive an exact operatorial reformulation of the rotational invariant slave boson method and we apply it to describe the orbital differentiation in strongly correlated electron systems starting from first principles. The approach enables us to treat strong electron correlations, spin-orbit coupling and crystal field splittings on the same footing by exploiting the gauge invariance of the mean-field equations. We apply our theory to the archetypical nuclear fuel UO$_2$, and show that the ground state of this system displays a pronounced orbital differention within the $5f$ manifold, with Mott localized $Gamma_8$ and extended $Gamma_7$ electrons.