I am looking for a word, that is suitable for the following scenario in bold:
For two years I used to go to the same restaurant with my best friend. Then I moved somewhere else. A year passed, and I came back to the same restaurant and ordered a dish. Suddenly, someone entered, and immediately I thought it was my old friend. However, in reality it was someone else.
So, what do we call a situation when we start thinking that the past is repeating but in reality, it's not. Like having hallucination that you are with your friend, but in reality he is not here. He's coming in your mind, because you spent a long time with him.