Ex and the past

How do you not think about and compare yourself to your partners ex's?

Example he was deployed while with them and he's deployed now with me I keep comparing the experiences and thinking of him coming home to them or how their relationship was while he was gone

How do you not compare yourself to them?