First you'd have to consult your local laws to see if such a homebuilt contraption is permisable, then you might consult your household insurance to see if it invalidates your cover, and then you'd see what local 'wiring regulations' dictate has to be done.
What is permissible and legal depends on local legislation, whether permanently wired or a plug-in unit, used at home or in a place where the public may be.
If you are going to do it the best way is probably a two pole mechanical relay of adequate rating switching both live and neutral with suitable fusing, correctly rated wiring, and proper earthing.
Your main concern should be safety, In isolating the electronics and everything externally from the live mains.