I agree with other comments to see a doctor first but Neosporin Triple Antibiotic Ointment is great. Try cleaning the area and applying the ointment then wrap to keep the ointment in place. It really works. My spouse had a finger that wouldn't heal around the nail area and the doctor had my spouse to apply the ointment at night and wrap the finger with plastic food wrap to keep the ointment on the wound. It healed within days. There is a triple antibiotic ointment for pain as well. Get the original Neosporin brand instead of a generic.
Depending on how bad infections can be quite serious. Def consult a doctor if it feels hot is red and swollen or discolored if it has a discharge and or has been ongoing for more than a few days. Anti biotic creams may help but most important keep in clean by washing hand with a anti bacteria soap and keep it dry. Wet bandages can be a bacteria playground Good luck