What? Why are we having so much trouble searching for a resolution to this problem? The solution is simple. There's a problem. Just... fix it! Simply, get them back together again. See how easy that was to find a solution that directly addresses the problem, and which resolves all the subsequent issues that arose from that one singular problem?
Okay, so, on a more serious note... When you're at work, I'd suggest just letting him ruin his life, by simply letting him under-perform (as much as it makes business sense for you to just leave him alone, and let him figure this out). Seriously. But, address this at home, since he's a personal friend. If you approach him during personal time, this will come across as one friend reaching out to another. And, then when he needs you (for advice, or just as a "pick me up" by having emotional support), he will reach out to you whenever he needs to, even if that's during work hours. If he does, then be a close friend and respond at whatever time he reaches out, because that's when he decided he needed it. But don't initiate this at work.
However, if you reach out during work to your co-worker, then the whole "close friend" thing may just feel like additional pressure because he can't just be dismissive of you at work without risking jeopardizing the friendship. So that will actually be more pressure, which may be the last thing he needs.
Express your concerns to your friend at home, and let him know you're trying to just give him space at work, and then do so. But if you need to infringe on him a bit by reaching out so he's in touch with someone on the planet, do such at home. Once his home life is more tolerable, he'll likely be in better shape to approach at work.
How can I help him and also improve his performance?
You don't. Let him get through this. Mention his performance if you have to, so that he'll see the need to get out of this hole in life (that he's currently in). However, let him decide when/how to take the steps. And make sure any help you give is not focused on "performance" or any other work-related word. You're in a powerful position because, of all co-workers, you happen to be a close friend. Ensure you are using that position correctly, by approaching this as a friend, which will be much more powerful than a friend/co-worker hybrid.
One thing I've learned in life is that when there's a hole, the best thing is to try to climb out of the hole (clearly), but then the best thing is not to try to avoid falling back in the hole just by using sheer willpower. Instead, the best thing to do is to fill the hole. Getting less analogy-based and more practical, that means getting his focus on "something else" more positive than living in regret and sorrow. That way, the "something else" fills his life, and then there's not room to also spend time brooding in sorrow, so the "something else" effectively removed the hole that was created when someone left his life. Just try to make sure that "something else" isn't something terribly devastating (like chemical abuse) is to intentionally choose some positive thing to try to fill that hole in life.