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.
Random words like the one you said? What a way to set an example,

Do you realize that what you said is contradicting? You said that people get addicted to substance because they want to "escape reality and they don't want to face their troubles in life". This means that they were lonely and afraid in the first place. They have a problem. People cope using drugs and gambling because it's the way they cope with the problems which doesn't really make sense since it only gives you even more problems.
May be some people have the same mentality and believe on it, but I think that it cannot be the main reason for which they start playing gambling. I think that there are a lot of other reasons that make people convince to start playing gambling.