@PennyChan,
This is a religious cliche- probably from a Pentecostal or Evangelical Christian church.
Praise is referring to praise of Jesus. A song in your heart means keeping a churchy kind of happiness.
The phrase indicates reacting to adversity with religiosity.