Thank you for writing JustAnswer with your health question.
None of these things that you mention (overdose of caffeine, anorexia, high resting heart rate, palpitations) will necessarily cause heart damage. But, it is possible that you had some minor heart damage (It is also quite possible that you didn't have heart damage, please keep in mind).
The way to tell would be to have some diagnostic testing. Non invasive testing, which can be done in most clinics, would be an ECG/ EKG (electrocardiogram) and if indicated an x-ray, ultrasound, and exercise stress test. These test will help determine if there is arrhythmia, heart is enlargement, heart failure, or poor exercise tolerance (poor strength - usually from inadequate exercise).
If you don't exercise very much your heart rate will tend to be more rapid. If you exercise, but don't have as much "fuel" as you need, this would increase your heart rate too (this could be an issue for you, if you are exercising, since your weight is quite low). Also, anxiety and stress can keep the heart rate elevated. For these issues you might ncrease your food intake and start an exercise program (walking is all that is required - it does not need to be anything overly strenuous - daily walking for at least 30 min will begin to strengthen your heart and bring down your pulse rate. Remember, if you gain muscle strength, there will be no visible weight gain, just strengthening and toning of muscles). If anxiety and stress are a problem, then there are measures to work with that as well. For example, his web site has great information to help deal with stress and anxiety if this seems to be an issue:
So my recommendation would be for you to have a check up and ask your doctor if you could have an EKG to test for any heart damage. This is a logical thing to ask for. The most likely cause for heart damage, if you had any, would be from possible lack of nutrients and electrolytes when you were at your most severe anorexia. I doubt the caffeine pills would have caused heart damage - if you were seen by a physician and had lab work after the overdose - heart damage would have shown up in the blood work (enzymes would have been elevated). If you have no damage (which I suspect, or at least hope for you) then you should consider a diet and exercise plan to increase for cardiac strengthening. This is commonly called "aerobic exercise" when it is done to strengthen the heart.
I hope this helps. If you have questions or comments, please reply so that I can help you with them.