I'm thinking of making a prototype PCB which would use a bridge rectified AC, which will end up with peaks around 350V in my area (+/- some smoothing). It's a through-hole design and the circuit will use a MOSFET, e.g. IRF840 (comments welcome). I'm new to AC, and I'm educating myself.
The problem is - I'm not sure how can I maintain recommended clearances since the MOFET's footprint (TO-220) has about 0.5 mm clearance between the pins, and I will be using it to switch the low side of the rectified power line.
By most standards, there should be at least 1.5mm between exposed metal there, right? How is this done in general? Are there different, larger MOSFET footprints? If so, why are there MOSFETs like this one which are rated to 500V+?