some gambling cases could be due to loneliness , but majority don't . people get addicted to drugs to escape away from reality , they don't want to face their troubles in life . So addiction leads to loneliness not the other way ! .
I think this kind of discussion needs a supervision of a suitable specialist not on forums where anyone can say random words.
It's still better to discuss with this kind of issues to also help other gamblers to narrow down the main issue of being lonely which leads to addiction. Addiction is a serious matter which needs to be handled by some specialist and you definitely right with your concern.