About a month ago my 89 ford ranger (with a 93 engine 2.3l) started surging but only when accelerating. sorta seemed like it was either out of gas or was fire correctly .. my father is a helicopter mechanic and has some experince with automotive and we both thought that it was a faulty fuel pump as ive been told that that year ranger had fault ones that tended to go out .. after replacig the pump assembly which was in the tank the problem continued. any how i replaced the sparkplugs and wires just as a normall tune up . the problem of course contiued. so i bought a code scanner and got code indicating the coolant temp sensor voltage was out of range, the egr valve position sensor indicating that it either was not opening correctly or not seated correctly and the o2 sensor was always reading the fuel to be lean and not switching ... i cant figure this problem out ive read alot of forums some saying that the cat might be the problem but recently the truck dies on me but always restarts.. some onehelp me .
I'd start with the EGR as indicated by your codes, take it off and clean it. Clear codes and run it, then pull the codes again if the problem persists. Also, some testing of the Coolent Temp Sensor and associated wiring may be in order. Once these problems are taken care of the lean O2 reading may very well sort itself out.
I'd go with Tiger, and add that the EGR may be adding too much recirc, and causing misfire... thus leaving unburnt fuel in the mix. The O2 is confused, and thinks the exhaust is rich, because the O2 there has not been combined with the fuel. So, it will try to lean out the fuel mix.
Follow the codes in the sequence presented, as the FoMoCo guys know more than me, anyway. They can cascade and cause false readings if you don't. The CTS can lead the ECM to add extra fuel 'cuz it thinks the engine coolant is cold. The EGR can cause O2 to futz up as above...