Hello, my name is Dr.Dorina Gurabardhi. I understand your concern.
I think that your symptoms are related to an infection of the skin that surrounds a toenail or fingernail.This is called
paronychia.
To prevent paronychia, try the following:
-Keep your hands and feet dry and clean.
-Wear rubber gloves with an absorbent cotton lining if your hands are exposed routinely to water or harsh chemicals.
-Be gentle when you manicure your nails. Avoid cutting your cuticles or pushing them back.
-Avoid biting your nails and picking at the skin around your nails.
Some advices that I can give to you are :
-soak the finger or toe in warm water. Do this for at least 15 minutes, two to four times a day.
Take an oral antibiotic.
-You also should elevate the injured fingers
-If pus has accumulated near the nail,it should be drained by a doctor.
Hope my answer was helpful , if you have any other questions I'll be glad to help, thanks!