The Extended Cartan Homotopy Formula and a Subspace Separation Method for Chern--Simons Theory