I get the same feeling here in Spain Toby. To be honest I think most people do. I think that it depends on the culture you are in a little. In Spain it is hard to make "real friends" because people either know each other from when they were kids or from School and basically already have enough friends.
I am still in the process of integrating. This is what I am doing.
#1 best thing? GOING TO THE GYM.
I have joined two classes and it is a wonderful feeling to walk in and say hello and people know who I am. At first it was hard cause my Spanish was pretty bad but I got over it and now that my Spanish is getting better I have made a couple friends. (Friends in the sense that I can call them up to go out of a coffee or drink). It is still a bit superficial but it is growing.
#2 Talk to people. In Spain it is not weird to just start talking to strangers in stores about the cost of something or getting opinions. Just ask or start talking. It is a great way to become more social and meet people. (Careful though...don't go stalking people).
#3 Learn more about the culture and history. I have a hard time with a few things because it is so culturally different. I don't understand why people are always in the street and not visiting in each others homes (in Canada you go over for dinner or watch a movie etc). In Spain you go out for a drink or a walk in the street.
Basically...I think the key it to get connected and talk with people. Take a class; join the gym, volunteer, and get to know where you are living.
It can be hard and lonely at times but it is best to make the most of it.
I love living in Spain and I want to get the most out of life. Sure I have days where I want to cry or feel like a total outsider, but then those days are few and far between.