While a pet can help maintain the mood of a person with an otherwise fulfilling social life, if you are lacking human companionship, you can't expect an animal to fulfil that need. A friend of mine is studying psychology and actually did a year long research paper on this exact topic - whether pets can help people who are socially isolated and depressed as a result. She was sure that the answer would be yes (pets DO help), however she was shocked to discover that in almost every case, a person who felt socially isolated, anxious and depressed actually felt NO BETTER with a pet companion. Some even felt worse, feeling that they must be completely worthless people if the only ones who wanted to be around them were animals.!
I think you actually need to give yourself time to adjust to a new way of living. Being alone CAN definitely be a scary prospect, and you may have quite a few sleepless nights before you learn to relax. If you get a pet now, what happens when your social life starts to improve. Are you going to have the time for the pet then? I don't think it's realistic to think that a pet will help you feel less lonely or anxious on your own. After all, a pet can't talk to you, understand your feelings or give you advice. I love animals and my life would be terribly empty without them - they are absolute treasures to me in every sense of the word, BUT they are not people, and I am. I need the companionship of my own kind as well, to fulfil me socially and emotionally.
Give yourself time to meet people. It can be hard to meet people when you are an adult in a new environment, but trying to get out there with someone you work with or joining a club of some kind might help. If there is someone at work that you feel is a friend, perhaps you could mention that you don't really know many people and wish you had friends to do things with. Your work friend may be able to invite you out with them or to meet some of their friends. This will at least get you into social situations where you might meet people you can relate to - whether from within that group, or from the places you go with them. Another thing that might help is enrolling in some short classes at an adult education centre. I've met a LOT of people this way, and the good thing is that when you are in a class doing something you're interested in, you'll meet others who are into it too. This is quite an easy way to meet people, and since most people go to these classes on their own, they are more than happy to meet new people in class.
Good luck to you - I've been in the same situation myself. It DOES get better. Just give it some time, and don't give up. Keep pushing yourself forward.