Pain and Hope

How does one accept the reality of pain and disappointment without losing hope? How do we surrender and face reality and yet not give up? How do we trust that God might never answer our prayer the way we want it and yet still keep asking for a miracle? How does one continue to experience loss and yet still have faith?