because it might not be the gas gauge that's the problem.
does your trac light come on when the tac goes down? and does the fuel gauge needle move at all?
my guesses without knowing your answers, crankshaft position sensor is why the tac shuts off while driving. and to fix your fuel gauge (common problem)watch this.. ‪Pontiac Bonneville Fuel Sender Replacement -- PART 1‬‏ - YouTube