How do you stop personal life from affecting your professional life?
I think the core way you can stop letting your personal life affecting your professional life is by reminding yourself of your own dreams and aspirations.
Whenever you might feel burdened by it, just write down your goals. Another thing you can do is start to practice affirmations. Just tell yourself before you do any task for work that you got this.
The key is to divide their time according to your schedule of the day.
For example, if you are in office/college/school, focus there rather than thinking only about what happened a day before yesterday or what should I do now, how something will fix, etc.
When at home, think about everything but not the stress you got from the work.
Involving both together becomes stressful and we end up ruining our professional life along with our mental health. Go with a fresh mind, interact with people, talk about things that make you feel good, keep all the worries at the side, and when you inculcate this habit it will become a part of your routine.