Heading for lunch was also a sad affair as it was pretty much just me and my food watching the world go by.
What helped me was to get involved in societies etc. I found making a couple of friends easier after this (though i was still a little shy around women).
The key was to just be myself, not give a shit about what other people thought of me, and to try and enjoy each and every interaction with another human being. I think if you overthink how other people perceive you, it will make it harder for you to make friends. Simply dont give a shit and voice ur opinions (unless they're extreme and illegal)
Funnily enough, as I got older, I found I much prefer being alone and focusing on my own interests and personal development.
I now cannot be asked to go out socialising at the expense of my own insular interests.
Reason I mention the last point is that as hard and lonely university will seem right now, things will get better for you. You may find,like I did, that people are insufferable wretches best observed from a distance.