I would recommend wiring the E-Stop to an input terminal via an NC connection. This is the industry standard. It requires a NC (Normally connected) circuit for the machine to be operational, and when the circuit breaks, the machine shuts off. This is better than having a circuit NO (normally open), open circuit that requires a circuit to be created to have the machine shut off for safety.
Having en E-Stop run through the mains line would only work for a single circuit (or use multiple E-stops, which defeats the purpose). The E-stop connected to the input terminal would shut off all machine functions.
Click the link to add information to this solution:
How should I connect the E-stop to the machine?