Create another local user account on your computer for being at work. Change the desktop background to big work logos. Don't configure your personal instant messenger accounts and whatnot. Set up the email client to only check the "work" account so you don't fall down personal email item rabbit holes. Configure the WasteNoTime Safari extension appropriately (more strictly than your personal account's config, with sit…
You dont need to do any of this. Walking away from a problem and doing something else ends up in faster more elegant solutions every time than avoiding distractions on the machine. I'll tap out a tune on my piano, play with the kids or sit in the garden for a bit whilst working from home. Then I'll do an hour or two of work and repeat. I deliver more finished higher quality code and solutions than anyone else chained…
I don't know where this 'being chained to the keyboard all day' mentality came from, even if I experience and have seen it a lot in the industry. Take breaks; in a lot of countries, the law or health & safety regulations even make it obligatory. And don't feel guilty over it.