Avoiding problems is always bad because the problem is not solved and comes back again and again.
Avoiding the problem over and over again, we enjoy a passing sense of comfort from the fact that we did not have to strain the gyrus to solve it, but this is just an illusion.
The problem will come back again and again, and the situation may worsen each time.
In addition, we will constantly think that we have a problem that needs to be solved, which will prevent us from being effective in other areas of life.
Any avoidance is avoidance, whether it is gambling, drinking or computer games.
Unfortunately in life there are problems that cannot be solved. In this case, an attempt to ignore/come to terms with them, I think, is quite reasonable. But gambling, it seems to me, is bad in this case, since it undoubtedly helps to forget a lot, but it creates new problems, mainly financial.
Well, that would be the case if you will not be taking care of that problem and you will be taking gambling as a solution. I know that there are people that would be wanting to enjoy themselves rather than face that problem but if you will not be facing it directly and use gambling, that would be a long time problem and you will suffer more with either a financial crisis or gambling addiction.