Stammtisch might help a little but for me, loneliness comes from lack of a lover. It's not the sex, it's the support, hugs, caresses, pillow talk, companionship that, at least I, need.
I had a weekly drink up for 15yrs and seeing friends 3-4 times a week for dinner and activities. It was 100x better than not but not sufficient to cure the loneliness of not having a life companion.
Of course good relationship > single > bad relationship