If you are not a do it your selfer, take the car to a garage and have them do a smoke test. This will find any vacuum leaks.
See if any codes are set.
Take a piece of wire and connect pin 4 to pin 12 on the diagnostic connector located above the drivers right knee.
Turn the ignition On and look at Speedometer LCD. Any codes will be displayed for the different modules.
Module 1 is the CCM
Module 4 is the PCM
Module 9 is ABS/TCS
Module A is the air bag system
C12 and -------- are not error codes.
Remove the passenger side fuel rail cover. Verify the two way vacuum check valve and vacuum hose laying along the intake manifold are in good shape. (Not cracked).
I doubt an oxygen sensor would cause a surge problem.
You need to use a scanning software program to monitor the engine sensors in real time. The program will allow you to save the data and play it back so when the surging occurs you can see what the value of each sensor was.
Go to
TunerCat
Look at the Datamaster scanning software package.
Another thing you can try is disconnect the electrical plug at the MAF sensor. The computer will use the MAP sensor to calculate air flow. This will set a PCM code so ignore it
The engine should run fine using the MAP sensor. If the surging stops the MAF sensor may be the cause of the surging.
To check for a vacuum leak.
Start the engine then disconnect the IAC connector at the throttle body so the computer can't control the engine rpm. Use a unlit propane tank with a hose attached to it. You open the valve and move the hose around vacuum hoses, the intake manifold, around the power brake booster vacuum hose and the two vacuum hoses at the cruise control servo. If the engine rpm increases you've found a leak.
Have you removed the IAC valve and cleaned the throttle body idle passages and IAC bore? They do develop carbon deposits. You can clean the throttle body and IAC pintle with throttle body cleaner.
Here's a screen shot of the DataMaster software. It can display O2 sensor signals, throttle position voltage, engine temp sensor voltage, MAF and Map signals, engine rpm etc.....
Here's a YouTube video showing how to test the fuel system.
https://www.youtube.com/watch?v=_oXLUqE4Sf0