Pus under the fingernail and acute swelling of the finger around sugguest that you might have an abscess of the finger with infection of the soft tissues of the finger. You will need to visit your doctor.
You will need to be on oral antibitics for at least one week and have the pus surgically drained out. The pus can be sent to the lab to check for antibiotic sensitivities to the bacterial infection.
regards,
Dr Benjamin Yim Fu Chuen