Could be any number of things... computer, injectors, fuel pump, plenum gaskets, sensors...
if it was me, i'd see if fuel pressure is right. if it's solid, even when it dies, then i'd check for gasket leaks. if no obvious problem there, i'd start tapping on different injectors and sensors and see if i could cause the problem to show up. if it's running like crap, take a LONG screwdriver and use it to listen to injectors. sometimes you can hear an injector not "firing". after that.. and i'm typing this while sleepy, time to get the scanner and watch what "things" are doing while it's running both good and bad so i can compare.
just remembered... if you hook up a scanner and it stops "talking" to the ECM and the truck is running like crap, 9 out of 10 times, it's the ecm. she's dying a slow death
good luck getting her gtg.