How do you stop the catastrophic thinking

How do you stop the catastrophic thinking that your ex is gonna move on so fast gonna find a partner of their dreams have a family and you’re just over here still wishing. We broke up two days ago and every time I think about this, I start to have a panic attack