how to return to main loop instead of function after interrupt?

The WDT header file you're referring to is for an AVR core, not SAM3X8E in the Arduino Due, so it gives a compiler error. Anyway, thanks for the suggestion and I'll work on it!