The thermostat has failed and they are suppose to fail open so engine doesn't over heat, engine will not "warm up" in the normal 5-8 minutes if thermostat is open.
This rough running is unrelated to above.
There are a few things that can cause poor cold engine performance.
When an engine is cold the Computer runs a richer fuel/air mix, like a "Choke" did for a carburetor engine.
This richer mix requires a strong spark.
I would pull out a couple of spark plugs and see what they tell you, should be clean and very light brownish color.
There is a 2 wire Engine Coolant Temperature(ECT) sensor, this is only used by the computer, dash board gauge has it's own 1 wire SENDER.
The ECT sensor is a very important sensor, computer uses info from this one sensor to setup all the other engine parameters, cold engine, warm engine operation.
On the 2.3l this 2 wire ECT sensor is on the drivers side of the block towards the front, below the intake.
If the ECT sensor has failed "warm" then the computer thinks you just came back out from the store and engine is all warmed up already, so the actually cold engine can barely run on the lean "warm engine" fuel mix.
Once engine actually warms up then it should run fine.
ECT sensor can be tested with volt or OHM meter, they rarely fail, not never, but rarely