Working from home is great for some and not for others. If your office is so terrible then leave, but be sure to tell your employer that you are leaving due to the office conditions.
At some point you'll need to put on your big girl panties and get back to the office, at least some times.