Hi an welcome to the forum! I am glad that I can help you.
You would like to know whether you might have experienced a heart attack, gastric reflux or an ulcer.
Pain due to heart attack is located in the left side of the chest or under the sternum. This kind of pain may radiate towards the left arm, neck and jaws. Pain caused by gastric reflux, gastritis and an ulcer is described as burning and may be located in the upper middle part of the abdomen or under the lowest part of the sternum. This kind of pain is related to diet and increases when acidic food is consumed and decreases if any food including milk is consumed. In young individuals that are under a lot of psychological stress, pain in the abdomen or chest, including tachycardia, nausea and palpitations may occur due to caffeine intake or lack of sleep.
Given the data that you described, you may or may not be experiencing gastric issues. Consider reducing the caffeine intake. You may want to start having a regular sleeping cycle, which means that you should be studying during the days and sleeping during the nights. Take Vitamin B6. See a gastroenterologist if you still experience pain after taking all the advice.
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor or other qualified healthcare provider such as a gastroenterologist for further advice and information about diagnosis and treatment options.