In different situations we are all chameleons to a point ... we act different in different situations. As painful as it may be for you just smile and say hello to him and then do your work. If he's interested in you then he'll ask you out.
It is also wise to get out with friends, have some good laughs, and make yourself more available. There are lots of great guys out there if you give them half a chance. You might just find that special someone. A good learning tool is not to date anyone at work because what has happened to you is exactly what happens to many.