Besides just discipline and energy, I also noticed one more thing working out helped me out with.
It provides a way to push your limits without being afraid of failure - because there is no pressure to perform. You can't lift the weight, no worries, just drop down a plate this week and give it a go the following week! This attitude propagates to work - you tend to take away failure as an excuse not to get something done!