sounds to me liek it is a IACV issue..
the iacv better known as the Intake Air Control Valve, gets loaded up with gunk and causes the car to act strange as hell...
easy way to take care of it, take it off and clean the piss out of it with TB cleaner and reinstall it.....
also, the IAA er whatver it is called now days is right next to the IACV, the IAA valve can also get gunked up and could use a cleaning as well....
im tired of cleaning mine so i just unhooked both plugs on the IACV and left the IAA pluged in, car idles normally and where it is supposed to now....if you have extensive mods and etc id check into permanetly keeping them offline....however if your pretty much stock id just clean em up and try again....