Apparently, in short, your heart wants to change, which is why your mind doesn't want to quit. It's really hard to fight yourself, isn't it? But you've actually got to give a reminder to others here, even though you yourself admit that because of greed, you can't quit.
Your warning is right; don't chase your losses. I agree with this; that's why you have a hard time getting rid of your greed. Anyway, if a gambler really wants to, apart from what you said that there must be a strong will, we must also be determined to do it from the heart.
He needs to train himself more so he can change and stop gambling. He could try to control himself first and not gamble for a while. And to fill the time he usually uses for gambling, he can try other activities that divert his attention. If he can do this, it seems he can change and stop his habit of gambling because avoiding gambling for a while while doing other things can help someone to quit gambling. Yes, he must have a strong determination from the heart to succeed in changing it and stop gambling. But if he still wants to return to gambling, he needs to practice self-control first because that can prevent his greed from getting bigger so he won't experience bigger losses.