LM317 Ripple Rejection
The 100uF cap at the input of the regulator should supply power for short dips, less than 1 ms in duration.  100 uF droops at 1V / ms at 100 mA current draw.

If your dip is longer than a few ms, you can try a bigger cap.

Also, you can gain a couple volts of headroom by using a low dropout regulator instead of the LM317, and a Schottky instead of the 1N400x diode.  That might be enough, but it would be nicer to solve the problem altogether.

100 mA is a pretty high current draw.  Look at your power budget.  Can you arrange to have the high-current parts shut off at brownout, so the microcontroller isn't in danger of resetting?

If you stick with the LM317, you can improve the regulation by bypassing the ADJ terminal: