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.