Does it matter?
If he has dumped you, the past is the past, and your present is about healing and moving on.
You cannot let go as long as you are trying to understand the past.
Think of the process as being like getting over a cigarette addiction. Your brain wants what it is USED TO. And has little temper tantrums - withdrawal symptoms - to try to make you light up another cigarette ... OR to push you to try to get him back.
This is what "missing someone" is all about .. merely the brain resisting the need to let go and change and move on.
And you no more get over him by dwelling on thoughts about him, than a smoker gets over smoking by lighting up another cigarette.
It will take you 4-8 months to completely get over him, but only if you let go of this need to dwell on him (disguised as a need for closure, a need for understanding why he dumped you). And only if you avoid him, block him on social media.
No, you cannot stop thoughts of him from popping into your mind. But you CAN stop yourself from dwelling on thinking about him when these thoughts DO pop up. And every time you turn your mind AWAY from thinking about him, you are one step closer to a new habit of NOT thinking about him .. or getting over the hurt.
Even just writing out this question took a LOT of dwelling on him .. delaying your recovery.