It is quite sad that your friend did not realized that he has done to much misery to his family. I understand your friends eagerness to recover the money but he should have realized that the more we chase losses and aim to recover in gambling the more we lose since our decision is greatly affected by the desire to recover the amount.
I am with you in suggesting your friend to stop gambling (for the meantime) and look for a stable job and pay for his debt first before going back to gambling. or if your friend can't stop gambling, he still needs to look for a stable job, and allocate a certain percentage of his income to paying the debt, fund for gambling, and family needs, obviously he must prioritize the expenses for the needs of his family.
But it looks like your friend is somehow stubborn and keep on insisting that he can recover his losses. I think you can't do anything in this situation and let your friend be, at least you had adviced him of the right thing to do, it is up to him if he will heed it or not.
Yes, it might sounds easy to make out some advises but on the time that you are on such condition or situation then it would really be that so something hard to be done.
After losing money then you shouldnt really be chasing it out, you should really know on calling it a day once it do happens. Always allocate on the amount on which you can only afford to lose
and never ever make yourself that too impulsive on trying out to make some recovery.