While FenTrac's recommendation for utilizing the device watchdog timer is certainly valid, if you find the system repeatedly suffers from such "lockups" then it would be prudent for you to determine what exactly is causing the issue and modify the code or hardware accordingly. Watchdog timers are intend as a last resort "fail-safe" when the unexpected occurs, they are not intend to routinely handle issues which occur with regularity.
As Arduino code can be difficult to debug, especially with issues which occur intermittently, you might consider implementing a trace stack in some form of nonvolatile storage, which is undated regularly with data which can help determine when and why these lockups occur.
BigDog