These cars have an electronic throttle body, which itself regulates the idle speed. If carbon builds up in the throttle body then the blades can stick and cause it to die easily and not want to idle... very common on nearly any automatic car with an electronic throttle... honestly I haven't run into it on a manual trans car... but that is probably because 99% of the cars that come through the dealer I work at are autos. They will randomly die at idle when shifted from P to D, and usually occurs on colder days/mornings.
You will be able to tell for sure if the throttle body is potentially sticking by doing the following:
-Turn car OFF and keys out of the vehicle!
-Remove your intake ducting to get at the throttle body blades.
-Using your finger, gently push the throttle body to it's full closed position(by default they go to about 10% open when not powered)... then see if it attempts to stick there... do it a few times, and see what happens. If so, then it probably needs cleaned and may be contributing to your problems.
Here is a quick youtube video I found showing the general process... it is on a Silverado that has electronic throttle as well so it's basically the same deal:
http://www.youtube.com/watch?v=MnWiOrnVk28
Only things to add that I do differently:
-If it's easy enough to remove the throttle body entirely... I'll go ahead and do that. Makes it super easy to clean it 100%.
-If not removed, I'll do like in the video, but also will spray some into the throttle body while the car is running when done(not too much at a time, you might stall it... just quick little "psst" "psst" "psst") which will get the remaining bit left inside that you broke loose, but didn't capture with the rag/toothbrush/whatever. You may set of codes if stuff is unplugged like the intake air temp sensor or MAF sensor(if your vehicle uses one). If it has a MAF sensor, it will probably need unplugged just to run without the intake ducting in place.
If the above fails... then maybe you just got bad at driving
FWIW there is not "idle speed adjust" on these since it's done by the PCM. If you set any codes, disconnect the negative cable of the battery for a few minutes to clear them. Coincidentally, it will also force the PCM to relearn all of it's parameters, including an idle speed relearn. So don't be alarmed if it wants to or even actually dies once or twice shortly after doing a battery disconnect. I haven't had to do this on a Mazda2 yet myself, so I don't know how sensitive they are to the relearn process, especially with a manual trans thrown into the mix.