If you can’t stop thinking about your ex — replaying conversations, missing them one minute and resenting them the next — you’re not alone.