I'm going to have sex with my ex's friend
Why are you going to have sex with your ex's friend?
I miss her so much and this will remind me of my ex.
It sounds like you are having a hard time getting over your partners. Not getting over them will lead to delusions like this.
Are you a therapist?
This seems like a terrible reason to have sex with someone. Won't your ex's friend be mad if she knows that's the only reason you're having sex with her?  And your ex would probably just be unhappy if she found out.