Let $X$ be a manifold with a left $G$-action, and let $\Sigma$ be a Riemann surface. How is the equivariant cohomology $H^*_G(X)$ of $X$ related to the de Rham cohomology of the associated bundle $H^*(P\times_GX)$, where $P$ is a $G$-bundle over $\Sigma$?

The following is my attempt at a solution. We know that $H^*_G(X)=H^*(EG\times_GX)$, where $EG\rightarrow BG$ is the universal or platonic $G$-bundle, with the base space $BG$ (the classifying space).

Also, any $G$-bundle is a pullback of $EG$, e.g., given a map $f:\Sigma \rightarrow BG$, we have \begin{equation} P= f^*EG \end{equation} for a $G$-bundle $P\rightarrow\Sigma$.

Therefore, we find that $H^*(P\times_GX)= H^*(f^*EG\times_GX)$. If $H^*(f^*EG\times_GX) = f^*H^*(EG\times_GX)$, then we have \begin{equation} H^*(P\times_GX)= f^*H^*_G(X). \end{equation} But is it true that $H^*(f^*EG\times_GX) = f^*H^*(EG\times_GX)$? References would be appreciated.