Download the Windows 8.1 install media here. Make sure to pick the same version as what you have.
http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media
You can burn the iso file or use Rufus to create a bootable USB flash drive.
https://rufus.akeo.ie/
Boot the install disk and select Advanced Options > Automatic Repair. See heading Booting to Recovery Environment with Windows 8/8.1 installation media or Recovery Drive/System Repair Disc on this page.
https://www.winhelp.us/repair-your-computer-in-windows-8.html