Most unfortunately, without a schematic the only thing I can tell you is that U1 is a transistor with mains voltage on one side and low voltage on the other almost certainly a MOSFET, part of a switch mode power supply; and the R2 is a resistor apparently in the same circuit.
The lack of markings makes anything further from the photos impossible. Wish I could help more.
With the amount of damage apparent on that board, the chances of repair are minimal - its almost a certainty there will be other compromised components that have, or will, fail. You need to be aware not only of what failed but why, lest you fall into a rabbit hole....
Considering DB1 top left is a bridge, I would expect U1 is one of these NON-ISOLATED OFF-LINE REGULATOR. They work ok when they do, but when they fail, they fail big time and burn everything around them. I agree with @Irving, most likely many things have failed or majorly stressed but may not look cracked, burnt or have hole in them. Chances of a successful repair is minimal and possibly short lived.
Also, be very careful as at least parts of this circuit looks non isolated meaning you are in danger of electric shock or worse as are any scope or test gear that is mans driven and earthed.