Yes, you can do that if you do not mind the ugly appearance. Black eye is described as there is injury on the face or the head to cause the blood and other fluids collect in the space around the eye area to present dark and swelling. Most black eyes are not serious injuries thus many heal on their own in a few days. However, you would feel a little pain about it as other minor injuries. You can wear an eye patch to cover it to prevent further injury. Or you can use ice place over the black eye that is an effective way for the first 24 hours.
Really, sorry to know that. Actually, I used to suffer from this damn black eyes and my eyes were bruised you know. So, based on your specific situation, it would not be good to go to the workplace. Maybe you need some time to rest, and it would be wise for you to ask for a sick leave for a couple of eyes, because bruised eyes would give impact on your vision and productivity.
You'd better have a good rest for the eyes which will make the black eyes get recovery soon. However, you'd better not work too much time. Or else, the eyes will get tired which will affect the cure time. You should use some warm cloth to cover on the eyes to make them feel comfortable.