Start setting boundaries at home. Your home and family life is a safe place for you to practice setting boundaries. You can, for example, decide that you will not spend time working at home on Tuesdays and Thursdays. Or you can decide that you will only spend 20 minutes checking your emails and spend the rest of the evening with your family or doing things you like.
Another great boundary I can recommend is that you never complain or list the negative things about your job over dinner with your family. Rather talk about something positive. You do not have to share your frustration with your family, especially not with your kids.
When you complain to your family, your kids do not understand the complexities of the working environment. All they see is a depressed and tired mom or dad. If you really feel like you need to get something off your chest, talk to your partner about it after dinner when the kids are asleep.
If your trip home was frustrating, take a moment to let go of that frustration before you drag it in the door with you. The happy smiles of your family will soon help your frustration lift. Your family is more likely to smile if you greet them with a smile first.