I do these at the end of every day, not just for long breaks. It helps resting my mind more frequently.
I leave code breaking very short notes about what and how to do. This provides my brain security that I won't forget what I was thinking so it stops thinking about them.
I take a short shower. The isolation helps my mind move further away and water provides relaxation and good sleep.
I engage in other mental activity. Gaming, drawing or photo editing. Our brains are poor at multitasking. If you give it a busy task, it will stop thinking about the other eventually. This is why having a hobby is more productive.
Related with the last one, a day long family time breaks my mind from everything.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I do these at the end of every day, not just for long breaks. It helps resting my mind more frequently.