Idle control valve may be dirty. May need new plugs. Both my 325 and 535 idle a lot better with the Bosch Platinum (standard type, not the +2 or whatever) gapped to .040". Maybe you're due for a valve adjustment. Or all of the above.
BTW, the O2 sensor doesn't do anything at all until the engine has warmed up almost to full operating temperature. So if the misbehavior is occuring with a cold engine, it definitely ain't the O2 sensor.