I had a very similar experience, although not as acute; used to drink a lot of coffee in high school (not as much as you), had chest pains, cut the coffee and switched to tea. Now I have a cup of coffee a day, and a cup or two of tea a day, both before noon. As the saying goes, everything in moderation. Apart from the heart arhythmias, though, you might have been doing your health a favor: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3439152/