My heart rate at the gym today reached a very high BPM about 4 to 5beats per second after I attempted to lift my heaviest and I felt pain in heart?

How was it. calculated? I am not sure what your total heart rate was? ( in beats per minute ). How does someone measure beats/second? Normal heart rate is 60-100 bpm. After vigorous exercise-150-180 with extreme exertion.
Need advice. This is apparently too much exercise or lifting too heavy amount of weight. See your doctor for clearance and then get a trainer to help with the decision of how much and how fast to lift. You may be exceeding what you can do.Do it sensibly.