Unsure how much help this is but; one's conscious attitude seems to guide one's underlying feelings to some extent. Working on accepting something has gone rather than allowing yourself the mull over a lost dream of a future that wasn't to be should gradually help your subconscious not keep regularly bringing it up for you to consider for minutes on end.
Regularly wishing it worked out differently becomes self perpetuating. You inrulge consciously and your subconscious seems to latch on that, that prived interesting, and brings it up again and again. Best acknowledge the thought/memory when it occurs but then opt to spend time thinking of something else more relevant to now. It is getting your mind to accept rather than long for what was that allows you to let things go.
I appreciate it's more difficult because of the regular contact because of your girls, but I still believe consciously working towards acceptance, rather than wishing and hoping for a return, is worthwhile.