These are called Subungual hematomas.Subungual hematomas are injuries of the nail bed in which bleeding develops under the nail. usually present with pain and discoloration of the nail.
Generally damage is caused by a direct blow or a crush injury to the distal phalanx, for example, getting a finger pinched in a doorway.
Next Steps
Rest: Limit use of the affected finger.
Ice: Use an ice pack, to reduce swelling.
Elevation: Keep the affected finger elevated, to reduce swelling.
for pain u can use any pain killer
Health Tips
for more u can consult.