Runners have a frequent problem: a toenail will catch on the end of the sock as the sock pulls up and over the top of the instep from the running motion. A shoe that is too short can do the same without a sock. This lifts the nail enough to cause bleeding underneath which turns it black and hurts for days or even weeks after. The cure is simple but requires faith and courage.
Unfold a wire paper clip, but leave one end at a right angle. Heat that end over a butane lighter or a gas stove.
Now is the time for that faith and courage. Place the hot end vertically down on the top of the toenail above the black-and-blue area, right where it already hurts, and it will easily melt through the nail completely painlessly (although with a whiff of smoke that smells like burnt hair). It will leave a small, perfectly round hole, permitting the drop or two of blood to escape, releasing the pressure and immediately reliving the pain. The toenail will drop down where it should be, and the hole will eventually grow out with the nail. You do not need to cover it or protect it in any way. You will forget it is even there.
Or, you could do nothing and hobble around in pain for weeks. A new nail will grow under the old one, and the old one will eventually drop off. Your choice.
It has been several years since I ran for exercise, but the same thing happened just a few days ago for no reason I could see. Probably my foot slid forward in shoes that did not have that extra eyelet (see posting of April 22). But the same cure still worked, and now I have a story to gross out the grandkids and the hole to prove it.
Of course, this is just my experience and I an only encouraging you to consider it. As they say in the ads, consult your doctor before proceeding. Only a fool would rely on my medical knowledge.