Regulating 220v AC voltage for halogen lamp with Arduino
With mains power I'd always recommend buying a pre-made product to perform dimming. They should have taken care of key issues of safety such as isolation. Also the timing of Triac switching can be tricky in dimming applications when a micro is driving. So best to get tried and tested code.

Here's an example including Arduino code. I haven't tried out this product but the low voltage is opto-isolated from the mains and the PCB appears to have physical separation between both voltage domains.