You may have to take your machine to the Computer Doctor - you don't say make, model or operating system.
It may well be that your motherboard is fine. It's possible that the motherboard is detecting a fault with the machine's power supply unit (PSU) and is forcing the machine shut down to prevent damage or loss of data.
Good news if this is the case - a PSU is not that expensive and if you ask the computer doctor to put in a donor (previously used) PSU you may get it half price. It's a ten-minute job to change a PSU.
Motherboard? May be better to buy a new machine. Sales have fallen 14% in the period Jan-Mar so prices are bound to get lower. Consider a new bottom-end laptop.
Good luck...
Peccavi
April 2013