As you have mentioned that you can see the black discoloration of tooth that means the tooth got decayed and spread an infection deep inside root as a result of that you got swelling. get consultation by dentist treatment will be based on how much tooth structure is left out after cavity.