Did you only replace the fuel pump, or did you have the airbox off, to expose the inlet manifold?
Revving on suggests either an intake leak or a idle control valve issue. I'm going with an intake leak, especially if you were working in the engine bay on a fuel issue.
Ralf S.