Just let it take it's course. It'll fall off and grow back. I always put a bandaid over mine when I do it so it falls off instead of rips off. It'd be a waste to go to the doctor. They won't do anything.
Ask your doctor about putting on a special kind of glue-like substance that can be put on the area to allow the new nail to grow in the original direction. What you don't want is the new nail growing out to grow either into the skin (which would be painful), or upwards, depending on how much of the broken nail is coming off. My brother once had a toenail fungus and most of toenail broke off, so his doctor either prescribed or suggested to him the "glue", and, eventually, his toenail grew back in the original position. Whenever a nail of any kind is broken much past its matrix, it would be especially important to keep it very clean, so as to prevent bacteria and fungi from developing under the nail after a little bit has grown back. My best bet, though, is to just check in with your doctor to see what he/she thinks, as it could be just minor. To learn more about the nail and injuries involving it, check out http://en.wikipedia.org/wiki/Nail_(anatomy)
My suggestion is that you keep the "broken" fingernail in place on your finger by wrapping the finger/fingernail in a band-aid (or some other form of sterilised adhesive) until the new nail growth reaches the tip of your finger. The danger with pulling the nail when it is very close to the cubicle is that (a) it may get infected; (b) it prevents the new nail growth from becoming distorted in new growth. Make sure you keep the area clean. If you are worried, seek a doctor's opinion.