Ignore the people who are being unhelpful. People make mistakes in freshers week that in hindsight only cause problems, like sleeping with flatmates. The thing to remember is that there are very few people who are still haunted by those problems a few months down the line. Your emotions are running high right now, you've just left home and it was comforting. It's no wonder you're having a hard time.
I just started university a few weeks ago and by the fifth day I was outside at 3 am crying on the phone to my mum and begging her to come get me. Luckily, she gave me some good advice which was to go get a cup of tea, put a movie on and fall asleep then rethink in the morning. So trust me when I say you're not alone. Almost everyone goes through this but most people try and hide how crappy they feel.
With that in mind, I've got several pieces of advice:
-What really, really helped me was the advice and wellness people. You don't need to make an appointment usually, you can just turn up and somebody will sit with you and listen and help you work out why you're feeling the way you are. Most people only need the one appointment, but they know what they're talking about and can give you some good advice. I felt so much better after offloading some of that stress.
-Join societies. There are hundreds of them, and most of my friends are from societies. Especially the sports ones, even if you aren't into exercise you don't have to be any good to join. Most clubs have a core team and then people who play for fun, so there's no pressure, you meet new people and you can run off a lot of stress. I joined the women's rugby team, and more than anything it guarantees I'll be out of my room and socialising for at least two days and one evening in the week.
-Go to your lectures. I know you can miss them because it's easy, but you'll meet people from your course and like with the societies it'll get you out of your room. There's nothing worse than sitting there with only your own anxieties to keep you company.
-Keep working on your flatmates. Don't wait for an invite. It's so hard to put yourself out there, but the reason they probably aren't inviting you is because they aren't sure you want to go out with them. If you ask if you can tag along, it shows them that you also want to be friends with them.
-Don't be so hard on yourself. It's only a few weeks in, it's no wonder you're feeling unsettled. Best friends aren't made in that short of a time and if it's your first time leaving home it's going to be a shock to the system. So you've made some decisions that maybe weren't the best. It's not the end of the world. I did a similar thing. Take some time to do something you really love. Take a hot shower, cook a good meal (or buy a good meal, if you're not culinarily inclined) and do your favourite activity. Whether that's reading, browsing the internet or whatever. Just look after yourself physically and stop beating yourself up for not getting everything right. These things fall into place.