If you reformatted and installed correctly, and if the computer failed so quickly then this is probably a hrdware problem. Can be overheating of the cpu, faulty hard disk, ram, motherboard, the lot. To start with please do the following tests. (Links to the programs are in my list below).
Reset the BIOS. Disconnect the power cord, open the box and carefully remove the cmos battery. Leaver it out for 10 minutes, reinstall and reboot. If you know how to do this by moving the reset jumper it will save you few minutes. You will have to set time and date upon first reboot.
Open the computer and blow the dust out. Use compressed air from a can that can be bought in any computer supply store. Most important is to clean the heat sink below the CPU cooling fan.
Download Everest and install it. Click on Computer and then on Sensor. Read the temperatures of the motherboard, cpu and hard disk.
Download memtest86, create a bootable CD and run a memory test at least for an hour. There should be no errors.
If your computer is IDE (use a broad flat cable to transfer data) go to Device Manager > IDE/ATAPI. Right click Primary IDE channel and uninstall the driver. Repeat the same for Secondary IDE channel. Reboot and see if there is any diffetrence.