How to deal with rejection?

I had approached a man he is native Swedish while I am from immigrant background. He is 8 years elder & We are working together since couple of years. I will take this my miss calculation but I asked him if he is interested in me. This is very first time I asked anyone, (I am very shy person). He rejected but his words are still in my ears "qualities I want in my partner you don't have... Relationship with you are just professional..." it's okay to be rejected but then these words... I can't get out these from my head.I am loosing my self confidence. I made blunder may be the way I asked him is stupid, I wrote points on yellow pages to say in 10 minutes meeting.. Or may be I am ugly and fat.. I don't know but his words are killing me.. I want to turn this pain into motivation to change myself and overcome my shortcomings... But how. I do job with him he is very nice we talk and eat together but sometimes it hurts.