It's too hot to work outside, so here's some thoughts. Most of them have been mentioned above.
-I'd make sure I didn't blow up the diaphragm in the lift pump. Replace if lift pump is toast.
-I'd check for diesel in oil due to above. Change oil and filter if contaminated with diesel.
-Rig a hose from a jug with clean diesel to the lift pump to start truck independently from the tanks/tank selector valve and from the lines and hoses before the pump. If truck runs great all of a sudden, the problem is before the lift pump. If it runs the same, the problem is after the pump. This does not mean everything is hunky-dory on the other end, it just points in the direction I would focus on.
-If truck runs the same with clean diesel from a jug, I'd remove the filter head and clean it, blow its passages with compressed air when it's off the truck, then install a new filter (unless I know for darned sure it's clean and good, but I'd probably change it anyway and save that one for a spare). I'd then replace the olive on the line from the lift pump to the filter head, the olives on the line from the filter head to the injection pump--there's two of them, one at each end. I'd then redo the return lines with new fuel hose and o-rings with a kit from one of the trusted vendors here. Or if I needed it now I'd get hose and viton o-rings locally (they're No. 111, I believe) and hope that the plastic caps themselves are not shot. After bleeding the air from the system, I'd start the truck and see how it goes. If the truck keeps on dying and doesn't want to start again right away when hot, I'd first slowly pour a quart or two of water over the pump as soon as it dies, especially around the rear of the pump, where the lines to the injectors are and see if it starts. If it does, this is a sure sign of a pump going bad. I would then check all the items below just to make sure.
-If truck runs better, I'd still do the above because I don't know when the last time it was done, but I'd do it later. I'd first make sure I don't have the "shower head" problem where it falls off in the tank and I'd make sure there's no debris/algae in the fuel that could be plugging up the sending unit or filter, and check the sending unit in general while I'm at it. Then I'd check the lines from the tank for leaks and replace any rubber sections with the proper hose, check for leaks at the fuel selector valve, and replace all rubber lines all the way to the lift pump as well as check for corroded/leaking along the metal parts of the fuel line. I'd do the same with the return line.
If after doing all of the above (which sounds more complicated than it really is and beats getting stranded all over the place) I'm still having problems, I'd start thinking about a quality injection pump replacement. Having been burned with an iffy pump my mechanic got for me, I'd only go with the vendors often recommended here. I'd also install new injectors from said vendors, or at least have them tested. Before doing this, however, I'd do a compression test, no sense throwing good money after bad if the compression is low (which, along with a bad pump and air intrusion was my problem to begin with). After installing the good injection pump and injectors, I'd time it dynamically, that is, with a timing tool and not just by ear or by just lining up the marks. I'd also check the glow plug system and make sure it's up to *****.
This is not necessarily what I did when my truck had issues, mind you, just the way I would go about it now. When I had my issues it got to the point when I just had to take a step back and follow all the good advice given here, step by step and in order, instead of chasing my own tail because things didn't make sense. I'm hope others will correct me or add to my comments above.
YMMV, JM2CW, HTH and so forth.