I would definitely do 1 of 2 things.
1. Stop hitting the bag for a long time. Give my arm a chance to heal. This is the long path because it doesn't tell you whats wrong so you are basically just giving your body a chance to heal injuries that may be minor
2. Go to the doctor to see if they can find out exactly what is wrong. If something is torn, then you'll be happy that you went to the doctor, If nothing is torn, then that's good news because, that pretty much narrows down to you either trying to hit the bag too hard or you are hitting with incorrect technique.
My personal thoughts on heavy bags is to always hit a heavy bag without gloves. Doing this will help you identify when you are hitting the bag incorrectly and prevents you from hitting the bag harder than you should. You'll know almost instantly when you are using bad techniques, or when you are hitting to hard. Wearing gloves allows you to get away with bag techniques because it takes it longer for the pain to sink in. Without gloves you'll know after 3 punches that you are doing something wrong. With gloves you may pound an incorrect technique and not feel the results of it until weeks later.