Sorry, this is kind of a long background story but I hope someone has some help!
About a month ago my Lumina (1999 LTZ 3.8L 85,000 miles) started jerking a little bit while slowing down almost like I was hitting the brake too hard and after 2 days of it the car would shut off while braking toward a stop sign or while idling and would to this without the jerk, no warning. I replaced the throttle position sensor hoping this would fix the problem, it did nothing. Soon after this the engine would jerk really bad while driving and shut off even during acceleration, the service engine soon light came on during this time. I took it to a local mechanic who said the error code was for a faulty mass air flow sensor, so that was replaced. This made things a lot better, no more dying or jerking while driving but there was a new problem. When starting the engine cold no issues, when starting the engine warm after sitting 20-30 minutes it would shake and the RPMs would fluctuate by 300-400, but once I put it in drive and started going it would drive smooth. The service engine light came back on so I brought it back to the mechanic. This time they said the fuel pump wasn't pumping enough fuel (low pressure?) and it needed to be replaced so I did that but it created a new problem. When I would start the car cold the RPMs would jump way up to 2000 then down to 0 or it would jump to 2000 then down to 500 then up to 1500 then down and so on until I put it in drive. So I brought it back again and they replaced a gasket around the fuel pump, put a new idle control sensor (i think?) and told me to turn the key to on, listen for the pump to stop pumping fuel and then start the car, I have never had to do that before all these problems. This worked fine for about 2 weeks and now I am back to the car shaking while starting it warm like it did before the new fuel pump and the service engine light just came back on. But again, once I start driving it runs nice and smooth like there are no problems.
Any ideas on what this could be? I am bringing it back to the mechanic tomorrow morning but I don't want them to try and sell me on another expensive repair that is not needed.