Do the best you can while at work. Hand over the reins to the next person and go home.
Easier said than done eh?
I have learnt over the years to leave it at work.
Once I leave my place of employment I am instantly thinking of what needs to be done at home. What to cook for dinner that night etc.
If your job starts to over take your waking moments and thoughts away from work then maybe it is time to have a change of scenery from the type of work that you do.
Being a perfectionist is ok as I tend to be with my job. It is the leaving it at work that needs to be worked on.
Honestly if it is starting to prevent you from sleeping you need to find a healthier way of dealing with this.
Talk to your collegues or someone at work that will just listen to you then give you advice.
Is your manager a person you can speak with about this?
When I am finished for the day I can honestly say I am focussed on my home with hubby and things we are doing together, not work.
Hope you get some rest.