I used to be more lonely and as I work as counselor I could see that problem a lot here in Sao Paulo-Brazil. This enormous city. But one thing I learned, you must keep your eyes and mind opened,learn with others and do some effort, besides some very good advices I´ve read here. For example, I learned small steps are great. You can join groups such as a local choir, a church group, etc., especially if you don´t know anyone. Another thing is to understand that having friends is a goal as any other goal in your life. So it needs effort. It is far easier to go into the lonely routine, it takes a bit more to grab the phone and call, invite or visit a friend. Today I transformed this into a habit. Within time you are able to see which friends deserve the effort and you want to get closer and those you do not. In any case, it is good to consider even those you think it wouldn´t work, because sometimes you have a lovely surprise.