The computer seems to have hardware damage, and that means a repair facility to get it fixed. At the very least you need a diagnosis of what work is needed and its cost.
Of course, if you wish you can give this a try although you seem to have implied it doesn't work:
Clean Install of El Capitan or Later on a Clean Disk
- Restart the computer. Immediately after the chime hold down the Command-Option-R keys until a globe appears.
- The Utility Menu will appear in from 5-20 minutes. Be patient.
- Select Disk Utility and click on the Continue button.
- When Disk Utility loads select the drive (usually, the out-dented entry) from the side list.
- Click on the Erase tab in Disk Utility's main window. A panel will drop down.
- Set the partition scheme to GUID.
- Set the Format type to Mac OS Extended (Journaled.)
- Click on the Apply button, then click on the Done button when it activates.
- Quit Disk Utility and return to the Utility Menu.
- Select Reinstall OS X and click on the Continue button.
To install the version of OS X that was currently installed use Command-Option-R. To install the original factory version when the computer was new use Command-Option-Shift-R.