You’ve made a healthy and wise choice for yourself. That doesn’t mean that you won’t experience grief. You’ve lost a valuable friendship through no fault of your own. Like most relationships, yours had many positive elements to it as well as the not-so-positive ones. However angry and sad you are about your friend’s unhealthy choices, you none-the-less grieve the good times and the parts if his character that you found loveable and loving. You are feeling “unbalanced” because both are true. You can’t just write him off.
The only “cure” for this is time. Acknowledge the importance of the relationship. Over 20 years, the two of you undoubtedly helped each other become who you are. But also acknowledge your own wisdom in taking distance. Focus on your other relationships. No one will replace this guy. No one person can ever really replace another. But I hope you have other people in your life who are important in other ways. As you deepen those relationships, the loss of this one will sting less. You’ll be able to remember the good times fondly while at the same time affirming your decision.
I wish you well.