Check your battery cables on your posts and other cable connections. Clean your battery posts.
Change your idle air control valve, if that doesn't work, the EGR. I went through the same thing for over a year before figuring it out. I thought it was the Mass Airflow for the longest time...
macintosh man