Could be loosing spark. Could be loosing fuel pressure. When is dies, check to see if you have spark and check the fuel pressure.
If it's losing spark, check the cap and rotor first. Then move on to the more expensive items like the coil and distributor module.
If it's losing fuel, the culprit is more likely your fuel pump.