switch it from heroin to speed and it will be better. try removing and viruses spyware malware etc. check your PSU.
Take out all the unnecessary components that you don't need to run your comp. I would take out the extra drives or extra installed hardware and run a test. It's also possible that a memory module has gone bad. Run a memory tester. Also maybe your Bios needs to be updated & flashed.
Scan your PC, check if it is over heating, and make sure it doesn't switch automaticly off ater so many minutes of inactivity (start > settings > power )