Oh, this is happening even when no motor is connected to the relay? Is the reset happening when the relay CLOSES? or OPENS? What relay are you using?
Did you try powering the relay off a separate supply like I asked?
Try placing a series diode that isolates the 10uF and 0.1uF MCU capacitors from the 100uF capacitor and connect the inductor coil on the anode side of the diode (so the inductor coil can only draw current from the 100uF capacitor and cannot draw current from the 10uF and 0.1uF capacitors).
I wonder if this issue could be caused because you are not debouncing your pushbutton. Write code for that too. You can check if the lack of debouncing causing the issue by writing a main program that just waits a bit, and then raises automatically D0 on it's own (no pushbutton) and see if it still happens.