I'd clean your EGR valve (have a new gasket on hand when you reinstall it) and your check vacuum lines. Check your ground connection to your starter as well (although that wouldn't cause it to die while running) because that might be why it won't even click and your starter relay.
Probably wouldn't hurt to run a bottle of HEET injector cleaner. Other things to check would be the fuel pump, injectors, and ignition coil. You might have a few problems going on at once.
edit: On the passengers side of the engine bay is a vacuum line running from the passengers strut tower to the engine bay that has a small (quarter size in diameter), round filter on it. they are $7 from Subaru. Replace that as well.
Last edited by monkeyposeur; 01-05-2013 at 11:45 AM..