I’ve been in your shoes man. Get whatever closure you need, and cherish the memories, but get out of there. Trust me. The sooner you move on the sooner your can be happy with somebody that wants that with you and then the painful sad memories can turn into fond distant memories. Trust me.
I’ve been in this situation too, more times than I can count, and it never ends with the friendship intact as it was before.