After what you've been through I'm not surprised, it takes time to get ovet something like what you have had happen to you and your confidence may well have taken a knock but don't in any way let it affect your studies because you need to focus your mind on the work aswell as keeping in touch with mates and friends.
I would recommend that you try talking to the girl who said she liked you and take it slowly, find out where your both coming from before you even begin talking about a potential relationship but don't launch right into it, the important thing is to take your time, get to know her and let her ask questions about your life, what things you like and dislike, also ask her what she likes and dislikes you know find that common ground where you both have the same interests and slowly build it up from there because if she is serious about you and you feel the same way then you need to get talking to her as soon as possible but also apologise for walking away that day and only if she asks why then explain but if she says its ok then leave it at that and see if she would like to meet you for a coffee someday and if she says "as a date" don't turn her down because that will be the start of what could be something special. She may even be able to help you begin to sort your problems out likw my other half did for me and I have been with her now for almost 14 years and during that time I have been to hell and back several times and all these times my other half has been there and I am sure that if you let this girl who said she liked you that she will be able to help you.
The important thing is, if this girl can help you, please let her help you.