Just a quick search on the internet reveals that chest pain and/or a racing heart beat is a severe side effect of this medication. You should stop taking the medication immediately and consult your doctor. There are plenty of alternative contraceptive pills to take, so there will be one that is much more suitable for you and cause less problems.
"Oh look, this pill gives me chest pain! Lets eat it!"
God, I'm sorry. I don't have any advice for you, aside from laying off either the pill or the coffee, because that does not sound very healthy. But it really sounds horrible when you put it like that.
But yeah, I get that sometimes when I eat too much, or eat the wrong foods. (Not on the pill.) I can't tolerate high carb foods or caffeine, because it makes my head tired and my body twitchy, not to mention that my heart complains about it. Solution? Don't eat the food that gives me chest pain. Because I kinda have this feeling that doing so would be a very bad long-term solution, and I'd guess that the same would apply to you. Check the 'warning' label online or on the container, or check with your doctor just in case.
Some energy drinks have been harmful while drinking it when you're taking the pill. I've never heard anything about coffee, but since a lot of people are on the pill and a lot of people drink coffee, and a lot of people do the both I think there would've been a lot of studies on the effect they can cause together - if there was any connection.
Still, it's always good to look it up, but I think people would've made a bigger deal out of it.