Does it blue screen or does it restart or just shut completely down? If it restarts, you need to set it to not do that and list the error message and faulting program on the BSOD, if any. What does the system log say? These kinds of intermittent problems can be very hard to diagnose, but you need to start by understanding any clues that may be present.
Why do you think it's temp related? My experience with high CPU temps is Intel processors will slow down whereas AMD processors will keep running and sustain damage. What CPU do you have and what temps are you seeing? How long has it been since you blew the dust and cobwebs out?
Have you scanned with several programs for malware and such?
I just yesterday took an old but nicely performing desktop running Windows 10 out of service because of a similar problem; it would just lock up ... become totally unresponsive. I swapped out every component over time except the motherboard to no avail. It used to lock up every month or so, then a couple of weeks ago that became every time I booted up. I finally just gutted the machine and recycled the case and mobo. There came a time when I needed to cut my loses and move on. You may have gotten to that point if your problem persists.