Reset the board automatically

You should only set the pin low and then do a while(1) {};

Once you set the pin low the ATmega will reset and the default state of the pin will be an input (open circuit). If you set the pin low then high there is a chance that the reset pin will not be low long enough to reset the ATmega.

Connect the anode to the reset line and the cathode to the ATmega pin.

(* jcl *)