Controling my heart rate

I went to the gym for the first time today in about a week and a half. I find the gym can be a pretty anxious place for me at times. When my heart rate gets high it scares me and triggers my anxiety. I am so proud of myself, for the longest time I have been so anxious at the gym. I can never control my heart rate and it will spike from 150-about 183 and sometimes it is hard to get it down to a resting rate. Today i just focused on breathing and didn't push myself to hard. I listened to my body and it never went up past 128!! Whoo! This is definatly great progress. I was able to work out for 45 min and I didn't feel skaky at all.