When picture going in and out, this could be caused by many reason, to identify the problem you have to provide more details about what the TV status during this issue.
Situation 1: When picture going in and out, if TV has sound and back light (the screen has some light) during image is out, the problem is the T-con board (small card on the top side of the screen inside the TV)
Situation 2: When picture going in and out, if TV has sound but no back light (the screen is totally black) when image is out, the problem could be the power supply board or defective LED strips inside the screen panel.
Situation 3: When picture going in and out, if TV doesn't have sound and back light, the problem is caused by a defective main board.
The parts like t-con board, power supply, led strips and main board can be found used in good condition at very low prices online. Good places to buy used TV parts online could be My Shop TV and Egual Buy. On this way you can fix the TV and you don't need to buy a new one.