HTC Desire HD Random Restart
You could start by not overclocking the device. That's a common cause of system instability even in ROMs that are usually stable. If it's still unstable because of that, it could just be instability caused by (bugs in) the ROM you're using. Try flashing back to the the stock HTC ROM.

If it's still unstable after flashing back to the stock ROM, it could be that your overclocking of the device has caused internal components to overheat, permanently damaging them. One of the functions of the CPU power governor is to slow things down when the device is overheating. Overclocking the device, or using a custom ROM where the governor is replaced by a less cautious or buggy one, defeats that protection, risking that kind of damage. If that's happened, you probably need to replace your phone and be more careful next time.