Use a Safety Standard Certified product for the AC line.
Since the withstand voltage and impulse withstand voltage are specified for each device, it is suitable to use Safety Standard Certified products that satisfy these voltages for capacitors connected to power input circuits.
You can search the Safety Standard Certified products from below.