When it says CPU fan failure that tends to suggest that the CPU fan is NOT running.As its the CPU fans job to stop the CPU getting hot I will go ahead and guess that your CPU is shutting down due to it being too hot.
Hopefully this is just a case of the CPU fan cable coming loose. in which case you can just reattach it. Depending on how many times you have tried to run it you may have killed to CPU by repeatedly heating the CPU to a temperature that is higher that that which it is designed to run at.
Hopefully for your sake the TDP cut out has saved you from that 50/50 chance really.