Ramdas, Please do not feel bad about yourself for things that are not in your control. People do come in our lives and some leave lessons to learn and we should learn and move on. It is painful to have heart break but slowly with effort,it will heal. Forgive people who hurt you. and this is when meditation helps. I discovered recently that breath can do wonders to our thoughts and feelings, just 10 minutes a day. Please search for guided meditation and slowly try to imagine that person and try to forgive her. it will do good to you and you will get your focus back to your studies in hand.
Remember that If one door gets closed, other (better) one will open.