before diving into spending alot of money it could also be a faulty vac line to the solenoid or to the egr
to see if the egr is whats gone get a hand vac start the car and pop the vac line off the top of the egr and connect the vac while running apply vacuum to the egr if your car starts to idle bad or even stall out the egr is functioning.
while you have it connected and the stalled out from applying vacuum, keep a vacuum applied (about 5 lbs) and see if it stays and holds,if it cannot hold 5lbs for more then 2 minutes it would mean the EGR's diaphragm is split/torn.
if the EGR checks out then its most likely the EGR's Vacuum solenoid. but again check the vacuum lines to each because they do go bad
Below is a borrowed picture you can see the EGR on the bottom of the pic the vac line that is on top is the line from the vacuum solenoid which is located on the firewall of the enginebay
Also Borrowed this is the EGR Solenoid which is attached to the back of the engine bay on the firewall