Confirm broken tail from a vet first. If it IS broken there's not much to do about it. Either accept it as is and be careful to avoid future injury or you unfortunately have the option to amputate. If the brake is close to the tip then I'd suggest leaving it as is, but if it's halfway down or closer to the rear end I'd get an opinion from a vet to see if it could cause future problems for your dog. Does he seem to be in pain?
Have your dog examined by a veterinarian. If the tail has a laceration it will need to be repaired. Less serious wounds may need to be protected with a bandage or an Elizabethan Collar. If the wound is infected it will need antibiotics. Most tail wounds are treated acutely as above and with pain medications. If the injury produces any long term problems the tail can be amputated.
I think hi tail was cosed in a closet door