Article says:
Accept your feelings around loss of sexual intimacy as both normal and appropriate.
If your sex partner is still alive but is unwell and unable to perform sexually, talk to them and find other ways to support intimacy.
Don’t compare your loss and bereavement to others.
Allow for time to grieve without outside timetables or agendas.
Identify one close person in your life with whom you feel safe and talk about your sexual loss.
Seek professional grief counseling or a grief support group, either online or in person.
If you experience physical sexual dysfunction during your bereavement, speak to your primary care provider. What may seem a normal part of grief may be a treatable medical issue separate from the grief response.
Grief and clinical depression are not the same. Speak to your primary care provider if you suspect mental health changes.
Grief is a complex human experience; so is sex. Sexual bereavement may arrive and complicate the process further. With gentle acknowledgment and conscious processing, this too may be overcome. Remember, you’re not alone in your natural human grief journey."
I'd add that part of acceptance means realizing that you will never have the sex life you want in your current marriage. If you've gone years without sex in your marriage, your partner isn't going to change and become the sex-loving partner you want.
Once you accept that, you can make a clear-headed decision about whether it's worth it to stay married or whether you'd be happier being divorced.