A few thoughts:
1. Restart your computer, and enter BIOS SETUP. Is there an option to "Load BIOS Defaults" ? If so, try it.
2. Power-off the computer, and disconnect the power-cord. Detach the mouse, the Ethernet cord, the USB cord to your printer, and remove all USB memory-sticks. Leave the keyboard attached. Reconnect the AC power, and power-on the computer, to see what happens.
3. Is it possible that the cooling-fan on top of the processor has failed (or its power-leads have become detached from the motherboard? This detected "lack of a working fan" could cause the motherboard to shut down. Power-off the computer, and remove a side-panel, to expose that fan. Disconnect the power-cord. Use a finger to try to spin the blades of the fan. If it does not spin freely, replace it. Reconnect the AC power, and power-on the computer, and watch to see if the fan spins when it gets electrical power.