There three ways to accomplish this. (last is the best)
Jumper an unused IO to the RESET pin. Leave it as INPUT for normal run, As it is externally pulled high. And when desired to reset set it as LOW and Output. (bang its dead).
Jump to beginning of the code.
.
void(* resetFunc) (void) = 0; // declare reset fuction at address 0
...
resetFunc(); //call reset
- Use the watchdog. The SoftReset library makes it easy. Although it is not difficult implement directly.