Can you expose yourself to heights in a safe, controlled manner, e.g. in an enclosed building, how do you feel standing near a window? What about sitting on a balcony instead of standing. The idea would be to systematically expose yourself to heights and overcome the fear incrementally. If your fear is a true phobia, then you may need the help of a trained therapist. However, since this fear came about just 5 years ago, you know there was a time in your life when you didn't have this fear, or at least have it manifest itself as a panic attack.
My wife suffered from a fear of heights and little by little beat it by going "one step further" each hike. It took her a long time and even now she'll need to think and talk her way through a tricky spot. It won't be easy, but you will find the fear diminishes as you come to understand it more.
I was utterly terrified the first time I rappeled. The guys I was with set up a small rappel station on a small (10-foot) ledge until I overcame the fear itself. After that, it was a lot easier. Maybe you can try bouldering or climbs in a controlled setting (a gym), and when the fear kicks in, mentally talk yourself through it.