What have you done with the fuel system? I suspect crud in fuel tank. When engine's not running, it may settle in the tank, so engine starts, and runs until crud builds up on fuel pickup, then engine runs like crap. I'd clean out the tank, pull the pickups and clean, and make sure fuel flows...