An application note from Vishay about choosing the right filter capacitors that are placed directly on mains. Link here (PDF)
To help reducing emission and increasing the immunity of radio interference, electromagnetic interference suppression film capacitors (EMI capacitors) are playing a major role in all kind of applications. These capacitors are put directly parallel over the mains at the input of the appliances.
Because of the high energy availability and the severe environment of surge voltages and pulses, applications of capacitors in connection with the mains must be chosen carefully. Two kinds of connections and thus two kinds of applications can be distinguished. One is where the capacitor is directly connected in parallel with the mains without any other impedance or circuit protection, and another where the capacitor is connected to the mains in series with another circuitry.
Read more Here