I would check the fuel pressure before buying a fuel pump.
http://www.autopart.com/tools/toolsmain/tool/T_3430.htm This is a picture Advance or Auto Zone has loaner tools.
I've used starting fluid and richened up the mixture when running rough. If it smooths out its a fuel problem.
If you installed an aftermarket EGR make sure you read the instructions and installed correct washers. The washers control flow and excess flow will cause all kinds of problems when hot.