Hi,
Opened the case and checked for lint & dust inside and espescially around the CPU Cooler, Video Card and PSU fan.
If lint & dust found get a can of compressed air suilable for electrical appliances and blow it out of the fans & off the motherboard & vents. I also use a Vacuum cleaner with a non metal tool preferable with bristles on the end. Not touching components but sucking up the loosened lint & dust.
Run your computer & if it's works OK the replace the DVD drive.
Okay so I have been having this problem for while now. My friends and I built this computer together, so I bought each part myself. I have had this PC for about 2 years now. My problem started recently when my computer would shut off ,by itself without warning, like if the power got cut. It was getting worse and worse each day. At first it would be if I was playing intensive games, then it would be if I had too many tabs open on my browser and then one day I could barely start it. It would get to the desktop and then it would shut off. I cleaned it before, but then I cleaned it more thoroughly and now I can browse again and play some less-intensive games. It stills happens just not as randomly only when I play more demanding games, so far. I have no idea what the problem is. If anyone can help out that would be great. I run windows 10.
PC Specs
Motherboard: Gigabyte Technology 990FXA-UD3 rev. 4.0
CPU: AMD FX(tm)-8320 8-Core Processor
RAM: Corsair 8GB Dual Channel DDR3
GPU: NVIDIA GeForce GTX 960
Power Supply: EVGA 650 GQ 80 Plus
Optical Drive: TSSTcorp CDDVDW SH-S223L ATA Device
P.S. Been having a problem with my disc drive too. The eject button sometimes doesn't eject. It also just doesn't work I'll put in a CD or DVD and nothing will happen I tried opening the drive in This PC and all it will say is insert a disc. Just a side problem I can save it for later.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic