Is confession necessary before dying?

On the threshold of death, or when we’re thinking about death, certain things can weigh heavily on us. For example, a forgiveness not given or a bad deed, an infidelity, a hurtful phrase, a refusal to love, etc. Is it…