1990 GMC sierra k1500 seems to run ok but intermittently loses power and wants to die but then returns to running normally. I recently replaced the egr valve which was obviously bad, for a similar symptom and I thought that fixed the problem. Also recently replaced the fuel filter. Could this possibly be bad ground wire connection issue?

 could be tons of things on something that old. First, I'd pressure test the fuel pump AFTER changing the fuel filter to see if it's that.  Weak pumps often do that, and they are electronic, limited life span

Thanks Scotty, I replaced the fuel pump about a year ago and pressure is good. Do you have any other suggestions?
It seems to only want to die when the vehicle is warmed up if that's any help?