Just as a measure of safety, office have fire extinguishers. But one of its safety pin seems to be broken half the way. Replacing it now itself, being a solution, if I am in middle of a fire, how could I make use of the extinguisher?
If you're in the middle of a fire, you shouldn't be posting on Lifehacks SE, you should be evacuating the building. (joke)
The general rule is, only fight a fire if it's either quite small, or you need to do so to clear an evacuation route. That said, if you were trapped by a fire and the only extinguisher in reach had this problem, you'd need some kind of tool to pull the remains of the pin out of the handles so you could activate the extinguisher. In an office environment, I'd look for scissors -- they can act a bit like a small-nose pliers or wire cutter, in terms of gripping the short straight end of the pin. Another option might be nail clippers (which many people carry with them) or a multi-tool (forbidden in some office environments because of attached knife blade, but pretty common otherwise -- I carry one every day).
One slightly out-of-the-box idea would be to very gently squeeze the handles to take the spring tension off the pin hole, and see if the pin will just drop out (turn the extinguisher on its side and shake) or strike the short end of the pin with the base of a stapler, paperweight, or similar, in hopes of driving it through so it doesn't lock the handles any longer.