In my opinion going to a physical casino has its advantages as well as disadvantages. It's okay to be entertained but there is no real guarantee of winning in gambling. If the person loses if he is sick it will be worse for his health. He will never recover physically if he worries too much after losing. In order to maintain his health he should keep himself occupied with activities other than gambling that will help him recover quickly.
If one knows about his health conditions, then it's better he moves far away from gambling if he can't maintain the ability of how to control himself while gambling, then it also have to depend on the desirability or sole reason why such gambler is gambling, considering his health condition, I don't expect such gambler to be gambling for money, instead for him to have fun and play, not minding whether he won or looses, these are my expectations on such gambler, as long as he could achieve that and control himself, he can gamble by having fun.
You have a very good point there. We can't entirely condemn gambling because we gamble for two reasons which are not only about money-making. People can gamble because of the fun they derive from it, while others gamble due to the money they want to earn from it, and if the former is the case of the person whose health is challenged, I see no big deal there. It might even be what will keep the company of the person during the time that he has to stay secluded for one reason or the other. But for the prevention of bad consequences in this regard, I advise that such a person should wager a very small amount of money per bet. This is how he can actualise the gambling fun and will not be burdened financially for whatever reason.
However, if such a person is gambling for money and not fun, it has to be done wisely, and if it has reached the extent to which it is now affecting his health, the best consideration is to quit gambling. After all, gambling is never by force and "health is wealth." It's only addiction that will make people continue gambling when they fully know that it is not positive for them financially and healthwise. And to avoid disaster, it is better to strictly stop it outrightly.