Sounds like fuel issues to me too. I'm pretty sure your fuel tank is metal. What I was told is that since we never keep the tank full all the time, moisture builds up on the inside of the tank and over times, rust scales off of the metal and gets into the fuel. Mostly it just sits at the bottom of the tank, but when you get low on fuel, it's more likely to get sucked up. At least that's how my dealer explained it to me.
I don't know your engine, but in both my backhoe and my dozer, there is a fuel pump with a screen in it that gets plugged up. It also has a glass bowl so you can see into it. Mine gets dark when it's full of debris and it needs to be taken apart and cleaned out. I use a rag to get most of it, then a can of carburetor cleaner to get it spotless clean. I have two fuel filters on both of my tractors, and a water separator. These don't get plugged up very often, but still need replacing from time to time. If your haven't' done it yet, you might as well.
I also have had good results using my air compressor to blow out my fuel lines to the tank. When it was really bad for me, I removed my tank and got it as clean as I could using water and then letting it sit for a day in the sun to dry out. I should have used something to coat the inside of the tank, but guess that will get done the next time it gets real bad. You will be surprised at what you find in there!!!!!
I also added a clear plastic inline gas filter before the fuel gets to everything else. It's a cheap Fram filter that I replace a couple times a year. You can see into it and tell when it's getting dark. Since doing this, I haven't had any more fuel issues. Depending on usage, I tend to replace it every other month. I don't know if they make them for diesel specifically, it doesn't matter to me. The gasoline filters do a great job of pre filtering what comes out of the tank!!!! I probably have five or six of them sitting on my shelf right now.