From what you've explained there - your system is shutting down automatically when you're playing games, as well as showing a message that your processor is overheating.
You could take this as two sides - a sign to upgrade, which is something you could do to get around these issues. Secondly, your CPU could be overheating, and all you'd need to do is maybe open the case up and see if the CPU cooler (the heatsink and fan) is dirty, or dusty. You could take the cooler off of the CPU and motherboard itself, clean the CPU and HSF up and reapply some thermal paste.
This is most likely the issue - and if you didn't want to spend any money, apart from the cost of thermal paste - this should solve your problems.
Of course, you could look at this as a sign to upgrade, and grab yourself a new Core i7 CPU, motherboard and RAM. The GPU, PSU and HDDs are all good, so it would be a cheapish upgrade.