I hate it when that happens. Usually for me it happens after I cut my nails because I guess I cut the skin a bit. So I've started wiping my nails with alcohol after to prevent any infections.
You can try a warm compress or something to ease the pain, but I don't have any other tips besides mental fortitude. Maybe antibacterial cream and a bandaid too.
