Mystery F250 diesel "dying" problem

I bought a 1997 F250 Diesel about 6 months ago. About a month ago it suddenly died on me as I was backing it into a driveway. It wouldn't restart and I had it towed to my mechanic. When my mechanic went out to
start it, it started right up and he was unable to get it to fail for him, so I went and picked it up.
Fast forward to Sunday/Monday. It died on me again on Sunday as I was slowly driving on a dirt road (exiting a horse show). Fortunately I was able to steer it to the side so that other traffic could pass (the show had just ended, lots of trucks and trailers leaving). I let it sit and then tried to start it again.
Symptoms when it is giving me trouble:
1) The "wait to start" light goes from solid on, to flickering before it goes off. Normally it goes from solid on to solid off.
2) Sometimes when I crank I get nothing.
3) Sometimes when I crank it sputters and tries to start.
4) Sometimes it starts and sputters and dies.
5) Sometimes it sputters and if I keep the gas on I can keep it turning and then it evens out and runs.
6) Sometimes it just starts back up like nothing happened. It does this each time the mechanic starts it, of course!
7) When it dies the electrical is still working (radio, fan, etc.). I know that a diesel doesn't need electrical to run (no spark plugs), but if it were electrical to the fuel pump and the electrical were dying system wide then the radio would go off and that's not happening. I also was wondering about the electrical because of the glow plug light flickering.
8) I have dual tanks. It happens on either tank.
After it finally started running smoothly at the horse show I was able to drive it home with no problems. Then yesterday (Monday) it died again while I was driving home from doing some banking. And it died again after I got it running, when I was trying to drive it to the mechanic. I was able to get it to restart both times by waiting, once it sputtered pretty badly when it restarted, once it just started right up.
So, what should I look at? My mechanic says "it's fixed" because it started right up for him. I asked him to look at the engine code because when it was sputtering the "check engine" light was on, but he says there is no entry when he looks for the code. :-(
I don't want to just randomly replace parts without knowing if the failure I'm describing could be due to failure of a specific part. Does this sound like a fuel pump problem? If not that, then what?
Also... when I bought it the seller told me that sometimes if you idle for a while (5 minutes or more) there would be a small fuel leak onto a valley on the top/back of the engine and you would smell the fuel. I've misplaced the email where the seller told me exactly what was causing this. I was told it was ~$300-400 repair. I'm wondering if this is what is causing the problems I'm having now, if this problem is getting worse to the point of causing the engine to die. If this rings a bell with anyone and you can tell me what the problem is called and what part needs to be replaced, that sure would help!

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
It sounds like you have 2 problems
the suddenly dying sounds like a cam sensor, they fail a lot
The second problem sounds like a bad glowplug relay, check if the plastic cover on top of it is melted too the post
But you need codes too be sure
If he cant access the diagnostic port let him check the cigarette lighter fuse, it think it also powers pin 7 of the obdII port
or try pepboys, they scan for free I've heard

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.