First of all, I am sorry to hear about this. It's no fun hiking when you are terrified. And it's no fun being at the top of a precipice and feeling that you might well fall over!
There are certainly plenty of hikes in the world that don't involve cliffs (exposure, in climbing terms) and of course you can always just focus on those. My wife suffers from a mild version of this, and we've still hiked more than 2,500 miles in various mountains around the world. Soemtime, admittedly, a bit slowly!
There's no real cure for acrophobia (the technical name for fear of heights.) Some people find it helpful to work with a psychotherapist, and that treatment usually involves something called, ironically, exposure therapy. This means that you take baby steps towards your fear, slowly trying to bring it under control. With virtual reality, this can be done in an office!
Medications to ease your fear/concern may no be a great idea, because people fear heights for a reason--they can be deadly. You want to keep that survivla instinct alive!