This advice from the Dr. is good, but I'm afraid it could be a tad too optimistic. I mean, even when the old spouse is dead, the attachment one has towards her/him might never fade. One might be stuck in the past - sometimes forever. I don't mean it's always this way; but sometimes it is: better look at the red flags.
In the original version of this post (in the Dr.'s blog), there are several revealing comments of people stuck in the past and not giving much value to the current (alive) partner. If you are living a situation like this, you better read them out:
https://www.drpsychmom.com/competing-with-partners-dead-wife/