I believe this movie was made back in the 80s.
This woman (main character) is being haunted in possibly a lighthouse made into an apartment. An elderly lady knows of the ghost that's there.
The ghost is a sea captain looking for his true love and thinks he found her in the woman that's living there. One scene shows her coming out of the shower and he (the ghost) writes her name on the fogged mirror.
The woman does some checking and finds out thru the elderly woman that the captain and his lover made a pact that they would commit suicide together, but the woman backed out at the last minute. I remember the captain looking like someone from the 1930's maybe.
The end of the movie shows the captain walking toward the woman, ready to take her. At the last moment, the elderly lady bursts into the room. The captain recognizes her as his lover and reaches out to her. She walks toward him and as she does, she becomes young again. The captain and the elderly woman vanish.