Thanks for your query and a clear picture.
The picture shows that the nail is almost dead and I think should be removed for the new one to occur normally.
Consult your Doctor and decide.
Till you meet your Doctor apply liquid Povidone iodine locally. Keep leg in elevated position if you are at home to reduce the pain and edema.
You will also need antibiotic and anti-inflammatory medicines.
These Q&A’s are for educational purposes and should not be relied upon as a substitute for medical advice you may receive from your physician. If you have a medical emergency, please call 911. These answers do not constitute or initiate a patient/doctor relationship.