X2 about the tps
the tps fins have to lined up perfect on the throttle body.
check to see if the idle air control valve is working properly. i remember once when my rig was very low on coolant the valve got stuck in a closed or open position and the truck wouldnt stay running. this has coolant lines running to it so it could be stuck when the engine ran hot and blew the HG.
is the AFM plugged in? is the flap inside it stuck?
theres the possibility of a huge air pocket in the cooling system which will cause it not to run right .