Stability of the Bakry-Émery theorem on Rn