Seriously, fix the issue. There could be tons of reasons why your CPU usage is at 100%, and restarting the server or killing processes when this happened is just going to be a recipe for disaster. If this is a third-party utility--either list it here or file a bug with the maintainers.
If this is a home-grown utility, it very clearly sounds like you have an issue with your application. My first intuition would be to check boundaries on any loops you have that might be using heavy processing power. Another would be to check to see whether or not termination conditions are being met. In all honesty, though, this is a debugging issue and should be dealt with in house.
As for your actual question, there's probably not anything built in--but with the correct permissions, you could certainly configure Nagios to trigger a remote restart (i.e., via ssh) when it detects certain conditions. You can use the system load indicators (usage != load) to monitor, say, the 15-minute intervals for a certain max value. You could also do this via a cron script that, say, runs every minute
I hope you fix the bug rather than work around it--future maintainers will be thankful, especially if its you!