Thank you for acepting my response, and also for providing the requested information.
The most likely causes of your problem are either worn or inappropriately selected spark plugs; a clogged or defective idle air control valve; a fuel injection throttle body that needs cleaning; a defective camshaft position sensor, or a defective crankshaft position sensor. If any vacuum hoses are disconnected or broken, or any vacuum controls have been disconnected or bypassed; that could also cause this problem.
If you are open to replacing the spark plugs at this time, it would provide a more stable point from which to proceed; and it might even correct the problem. I would highly recommend using a set of Bosch Fusion # 4508. They are a unique design, which I feel is a better match for your engine than other brands. These plugs come preset, and the gap cannot be adjusted.
The idle air control valve on this motor, at about $80, is more expensive than most. For that reason, I would thoroughly clean it at this time, rather than replacing it. But it might be worthwhile to also test the electrical circuit which activates it. You might be able to make a simple test of the activation mechanism by listening at the valve or pressing a finger to it while someone turns the ignition key to the position where the dashboard warning lights come on. If you feel or hear the valve click when the key is turned on; that would be a reassuring event, although it does not guarantee that the internal parts of the valve are functioning. But it still will need cleaning. If there is no sound when the key is turned on; that would not necessarily condemn the valve; but it would still leave it suspect in the event that no other problem was found.
The fuel injection throttle body should definitely be cleaned; preferably by using Valvoline Syn Power throttle body cleaner, while paying particular attention to clearing any small openings, and removing all traces of deposits from BOTH sides of the throttle butterfly and the bore in which it seats.
If the above measures do not correct the problem; I would replace the camshaft position sensor and the crankshaft position sensor.
I'd be interested in your feedback on this process.