After working out and getting in 10% better shape, improved my looks, fashion and everything, I also had a good day at work so my confidence was at its peak
Although it didn't work out with that girl, you improved and that is a good thing. Due to oneitis, you don't see things objectively anymore. Been there done that. That girl is actually not that hot, you made her a goddess in your mind.
Because of the oneitis you put too much pressure on yourself, when you asked her out. You are actually asking her and give her the power to decide whether or not to go on a date. She sensed this and you were no longer a challenge for her. You are a nice guy, and nice guys are not attractive to these kind of girls.
This explains why she choosed that other guy specifically, he wasn't as nice to her as you were. AND that attracted her, my friend!
In the end, it is all trial and error. Accept this one and next time you will be better!