Help please

i have a problem of overthinking . Lately i have been overthinking about my boyfriend's ex i can imagine them living happily and doing great .If i think of my boyfriend kissing me it turns out that i am picturing him doing the same with his ex.These thought really bothers me .I have been really depressed during these.The more i try not to think about it the more i think .I cant sleep because i just picture them together.But i haven't ever met this girl nor seen her in pics i only know about her as much as my boyfriend has told.After their breakup its been years since they haven't been in touch .But still it these thoughts bother me .I cant get my mind off this..its like im being jealous of a person i dont even know. These thoughts are very disturbing , whenever i think of it i feel like crying. Because if it i have really sad in these few days.Can please someone suggest what can do to overcome this feeling