Try not to gamble for a while, and don't think about returning to gambling so that you don't have the urge to gamble again. You need strong determination and effort to eliminate the desire to gamble again, which is not easy. You need to force your mind not to think about gambling, and if necessary, you can do other activities. Maybe you need to visit a professional to ask for help to overcome these feelings of depression and eliminate the desire to gamble again. It all lies in a strong desire to be able to leave gambling, but even if there is a desire, if you are not serious about doing it, you will probably return to gambling again.
All the things you are saying are okey and are logical for someone who is not still very deep into gambling addiction or someone who has a very big willpower to overcome the feelings and the cravings to continue to gamble. In my opinion, saying someone something like "try not to gamble" is not appropriate. Though, it is appropriate to tell them to seek professional help if they can.
If he cannot immediately get help from professionals, then the best shot for him would be to get in touch with people he can trust with his problem, and ask them for help to self-exclude from gambling platforms and find distractions off the world of gambling.
We must recall that addiction is not something which can be willfully controlled as some people imply, if someone is suffering from problem gambling, we need to assume such person has completely lost control over his desires and and will power.
If this was any other kind of addiction, you would not ask for him to embrace to his own willpower and desire to recover, wouldnt you?