Well, when your engine is warmed up, the car is in open loop mode while driving, meaning it uses the MAF for calculating A/F mixture. If idling when the car is warmed up, the car will start out in closed-loop mode, meaning it uses the 1st O2 sensor to calulate the A/F mixture then switch to open-loop mode after the TPS/RPM's hit a particular threshold and the O2 sensor senses there is sufficient airflow detected.(This is theorized but you get the idea between open and closed loop mode.)
Also, when your car is cold, the engine stays in closed-loop mode until the ECU believes that the car is warmed up enough to go into open-loop mode.
Enough theory....
So, does the car die at idle or while your driving ?
When was the air filter last changed ?