It is a very rare side effect, and I would want to look for other possible causes before diagnosing depression in a child as young as 4 or 5.
It is important to find out what is affecting him, whether he is in physical pain or whether all these visits to the doctors is causing him to feel under pressure. Also whether he is worried about any changes to school or friends moving away for the summer.
It would be interesting to see how he responds to things which he normally enjoy or is a 'treat'. If he is responding as normal to new adventures then it is unlikely to be the medication. Also is there any change to his appetite?
Why was he put on the Zantac in the first place?
Obviously diagnosing depression in a child is a highly skilled task however normally we would expect to see disinterest in normal fun activities, changes to sleep pattern and sleep behavior as well as reduced appetite and mood changes.
I would quietly keep an eye on his behavior over the next few days and then schedule an appointment with his doctor for a review and discuss all the changes that you have seen.If you still have concerns then it would be worth discussing whether he should stay on the Zantac.