It sounds like you have limerence. It's a very painful state of romantic obsession with an unavailable person. It's often characterised by looking for "signs" the person really wants to be with you when the signs may be in your mind. The way you describe yourself mistaking a random person for this man sounds exactly like limerence. There's a great Youtuber called Crappy Childhood Fairy that talks about this and she has a whole series on limerence. Maybe it will be able to help you move on from this painful mindset.