Relay Module turns on and off in a loop
SAFETY first.

Your 230V input plug (on the right side of the photo) should be shielded using either electrical tape or heatshrink.
There should be a physical barrier preferably made out of acrylic or ABS or any kind of plastic would do the trick.

By the sounds of it, your Arduino board is browning out as soon as you supply power to it using the SMPS. I would recommend that you first shield your 230V mains and make it completely safe for troubleshooting. I also recommend that you test the output of the 5V regulator. Somehow your DC power supply is either not functioning correctly, or has way too much noise for Arduino. Although the noise should be fixed through the 5V regulator but still, something to look into. Also, your 5V regulator may need a heatsink for heat dissipation. 12V - 5V = 7V. Therefore, 7V * 1.5A = 10.5W. Even if you don't use 1.5A of current, your 5V regulator might still be getting warm and you may need a heatsink to keep it cool and happy.
I also recommend not to use breadboard and have mains voltage in the same space. It is not a good practice and certainly quite risky. I would recommend you to build a PCB where all the components are soldered (glued) to the board with no wires that could detach from the breadboard and touch any 'unshielded' 230V terminals which is just a disaster waiting to happen.