I would say pull out of the contract. However, they will be responsible for your rent as well as theirs, if they can't find a replacement.
I can empathise, having been in the same situation, but I didn't have the guts to not resign the second year, so have spent two years in the situation where they were nice, but still pretended to be 'ill' (it was so blatant- delivered in a monotone voice etc) so they didn't even have to go out on my 21st birthday. By the middle of the second term of that first year living with them I'd found a friend and her 'group' to go out with, but it'd happened naturally so for quite a while I was down because I was going out every now and then but wasn't sure if I was part of that group or not, and if not then I did'nt have a group. (I was in the end!) I did join societies that went out a lot, but everyone there went on the society nights out with some of their own friends, so I was still on my own, and people even commented, 'did you come on your own then' so I stopped going as I was not comfortable even before the comments.
Just to tell you, the worst part of this was that I could have lived with my first year hallmates, but didn't because I thought they didn't like me enough to live together (I had esteem issues then), but two months after I'd and they'd got houses, I realised otherwise, and it was too late- was signed. I really regretted it. I did like these second/third year housemates as friends but not to live with- we were incompatible, but my hallmates were ideal to live with. Having to decide houses after less than 3 months at uni didn't help as I was still settling in. I advise you not to make a decision to regret like I did.