Loving yourself is the first step toward allowing others to love you. Also, if you keep vying for his attention, in the manner that you wish, you may push him away further. Good relationships are built on trust, respect and mutual admiration. Relationships are hard work and worth every effort. There is a saying that everything worthwhile is hard work and takes time.
Relationships are no exception.
A way to stop caring about him is to surround yourself with positive people who like you just the way you are. Also, surround yourself with those who treat you with love and respect daily. Life is too short to have relationships with people that you don't know from one day to the next whether they are going to be nice to you or bite your head off. You might try telling yourself positive affirmations on a daily basis, or whenever you feel yourself starting to think about him. For example, tell yourself that you are a beautiful loving soul who deserves a loving young man.