Yes i remember god when i was in sad too because by remembering god i got a hidden power to get out from Sadness........
Generally people remember some god when in distress. Once there were about one hundred passengers in a ship. A sudden storm wrecked the ship. The passengers feared drowning. They prayed to gods of their choice.
Lord Christ saved his disciples and carried him a a boat. Similarly, Zoroastrians, Sikhs etc were saved. Hindus were left still in ship. ALL were remebering Lord Shiva, Vishnu, Rama, Krishna etc.
Ultimately, some one suggested: Let us pray to one god only. So, all prayed to Lord Ganesha. Lord Ganesha appeared and laughingly began upsetting the ship. The devotees were afraid: Lord, You are drowning us instead of saving. Ganesha said: what you do every year. you all drown my image in ship and call this ganesha Visarjan. Now this is my opportunity.