ESRI provides a guide to repairing corrupted shapefiles which you can find on the ESRI website: https://support.esri.com/en/technical-article/000007161
I can't check on my machine but one of either the Shapefile Repairer Utility or the Shapefile Repair Tool (which are linked at the bottom of that ESRI help page) used to be able to reconstruct a .shx file.
You can also do it in Python. This link suggests this code to recreate a .shx file:
# Build a new shx index file
#Code by Joel Lawhead http://geospatialpython.com/2011/11/generating-shapefile-shx-files.html
import shapefile
# Explicitly name the shp and dbf file objects
# so pyshp ignores the missing/corrupt shx
myshp = open("myshape.shp", "rb")
mydbf = open("myshape.dbf", "rb")
r = shapefile.Reader(shp=myshp, shx=None, dbf=mydbf)
w = shapefile.Writer(r.shapeType)
# Copy everything from reader object to writer object
w._shapes = r.shapes()
w.records = r.records()
w.fields = list(r.fields)
# saving will generate the shx
w.save("myshape")
Not that code requires the Python Shapefile Library (pyshp) to run.
.shp, then the shapefile is corrupt, and none of the data can be trusted. The.shxcan *usually* be recostituted from the.shp, but it depends on whether there are any "gaps" in the file data stream. – Vince Dec 17 '18 at 13:13