I have been having this problem off and on since I got photoshop but cannot find help anywhere. In the middle of working on files (it occasionally happens when opening a previously saved, uncorrupted file) they begin to glitch and I cannot figure out how to fix them. My software and computer are fully updated, and I have tried restarting them, I've also tried turning off the graphics processor but nothing has worked. I have wasted countless hours having to remake images so I just really need to get this fixed. I attached an image of what it looks like...anyone have any advice?
If this is happening often, I would look at resetting Photoshop's Preferences assuming CC 2015 or later.
Now as for recovering a corrupted file:
Repairing damaged adobe photoshop .psd files? This gives you some resources.
But the best protection is Dropbox and versioning where you can save as often as you need to and if something gets chewed up, you can at least get the most recent version. How often you save depends on how much work you would need to rebuild a bad file.