Okay, I will try to break the issue down for you. Right now, I suspect you are having pH issues for 2 reasons.
1) Your nitrites are high. When I say high, anything above 0 is considered high. When your ammonia or nitrites are higher than normal, your pH will drop because inorganic material is decomposing, forcing your pH down.
2) Your calcium is high. When your calcium is high, your alkalinity is usually low. pH, alk, and calcium are all related. pH relies on alkalinity, and alkalinity is tied in with calcium. A calcium level of 500 is a tad high. 400-450 ppm is ideal. Thus, I am guessing your alkalinity is a little low.
When pH drops, the pH relies on the carbonate hardness to buffer the pH back up. If your carbonate hardness (alkalinity) is low, your water will not be able to buffer the pH back up on its own. This is what I suspect is happening in your tank.
Because your nitrites are high, your pH is dropping. Because your calcium is high, your alkalinity is probably low. Because of this, when your pH drops, the water is not able to keep it up because your carbonate hardness (alkalinity) is low.
Thus, when you add the pH buffer to your tank, the pH comes back up. But anytime it is forced down (such as when the nitrites rise), it cannot go back up because your alkalinity is still low. If you do not fix your alkalinity, you will always be adding pH buffer.
The first thing I would do is get a alkalinity or kH (carbonate hardness) test kit so that you know where the level is. If you find that it is low, you need to buffer the alk, as opposed to the pH. A great alk buffer is Kent's Super dkH buffer.
Also, know that carbonate hardness (kH) is another way of measuring alkalinity.
I am not sure if that made any sense to you, but if there are any parts that confuse you, please ask me and I will clarify some more.