If you're running Windows, there's something in your control panel(under power options, I think) where you can enable and disable automatic restart. I believe when that's on, it will shut itself down, and when it's off, it'll just keep going to the bitter end.
Not sure if it works or not, I don't really have any need to overclock.