04 Ford Focus: Rough Idle / Intermittent Check Engine Light?

2004 Ford Focus, Manual transmission SE 120k Miles.
2 weeks ago I had a fluid leak in my vehicle. I took it to my trusted mechanic and I was told I had a slightly damaged oil pan leaking a very slow leak and the thermostat housing was leaking coolant substantially. I had both fixed, brand new oil pan and a used thermostat assembly from a scrap yard.
After getting the vehicle back I noticed a slightly rough idle while in neutral at a stop sign or red light. It wasn't that bad at first but it over the following days it grew worse. Finally, last Friday it came to the point where the vehicle almost stalled at a red light. I tapped the gas slightly to rev the engine and prevent it from stalling. My attempt was successful but as soon as I hit the gas the check engine light came on. For the rest of my drive I had a rough idle and the CEL was lit. The following day on my drive to/from work I had the same problem. That afternoon I made another appointment with my mechanic to have this issue investigated. On the third day, during my ride into work, the CEL was lit with the usual puttering engine at idle. But then after work I started the vehicle and, mysteriously, the engine sounded and felt absolutely pristine, and the CEL was no longer lit.

So basically, I'm wondering first if I should keep my appointment with my mechanic, and second if the previous coolant leak, from the top of the engine compartment leaking downward, could have possibly somehow caused the current issue.

Did the light flash or was it steady? There are codes stored in the computer. They need to be retrieved to point the way to repair. For now, check all the plug wires, any coil wires, battery connections and such.