the dc derived from mains , is not isolated.
thus
it would be an issue to drive direct from micro controller.
Opto isolator can be used where the diode section would be driven from micro.
The output transistor should have separately derived DC from the mains
and that can be stepped down to 12V by some zenor and a high value resistor. this devied auxilary voltage need to be used for driving the FET.
Instead of all these confusions,
the best appears to use Opto coupler like MOC3041
where an auxiliary triac can be driven from the internal triac.
and directly AC can be switched. You don't need bridge and FET