I have a question about the need of the use of the X2 capacitor. I have a simple design which can be connected to AC line and I not use an X2 class capacitor but I m using an SMD capacitor from Murata (GA255DR7E2104MW01L) (size much more compact than THT X2 capacitor). However somedays, I discover that the SMD capacitor C1 is damaged (cc) which cause the damage of the two resistors (R1 and R2). For this circuit I use also a unidirectionnal TVS diode which is the P4SMA400A, to avoid overvoltage. So is there any need to use an X2 capacitor for my case? Otherwise what can be the real cause of the failure of this capacitor. I thank you for your help.