You can chat with your loved one about the person they are mistaking you for, or ask about something related to them. The important thing is to not try to get her to understand or to make her wrong.
For example, if they call you by their brother’s name and you are her husband, you can say something about their brother. You can say, “Your brother, Joe, is such a funny man, isn’t he? He always knows how to make you laugh.
You two have always gotten along so well.”
You can also mention who you are, but don’t be upset if they don’t retain it.
You will know by their reaction to the conversation whether or not the direction you take is comforting them or agitating them. Follow their lead. The goal is for them to feel good; not to retain facts.