have you worked out the voltage isolation issues yet? Pulse transformer or optoisolator or other?
the way I do it is:
use an input capture to interrupt on the zero crossings, use the delta readings to determine the incoming period.
in the capture interupt set a timer interrupt to happen some time delay from the zero crossing for the start of your trigger pulse.
in the trigger pulse interrupt, set another timer interupt (can be the same timer) to occur when you want the pulse to turn off.
software control of the trigger pulse will most likely be accurate enough, and is more easily accomplished than trying to get a PWM channel to do what you want.
For the zero crossing, you want to be sure you have good filtering and hysteresis, as noise will trigger this otherwise. This hysteresis and filtering can cause the zero crossing ISR to occur late and un even for the positive and negative half cycles depending on your circuitry. Your software will need to handle this.
Good luck
Bob