Fuel gauges aren't hooked in to the ECU in my 2009 D40, so I'd take a stab and say yours is a direct read from the tank as well.
That means they're simple units. Power goes to the tank, the float in the tank adjusts a resistor and the return power goes to the needle directly.
That means there are only a few things that it could be:
1) Bad earth or connection on the instrument panel
2) Damaged wiring to the tank
3) Bad connection on the tank
4) Failed resistor on the tank
5) Damaged or sticking float arm in the tank
I'd guess that 4) and 5) are part of the one unit and replacing one would fix the other anyway.