The pain of grief can be intense after someone you love passes away. But the grieving process can be good, even though it feels bad. Grief can actually be a gift that teaches you something valuable: wonder. The process of grieving well can lead you to inspirational discoveries you couldn’t have made without experiencing the pain of a loved one’s death.

Here are 5 ways that grief can inspire and teach you:

1. Grief can show you how resilient you can be. Grief hurts deeply, but it also challenges you to dig deep within yourself to discover how strong you can be. You’ll go through a lot of challenging emotions during the grieving process – shock, anger, discouragement, loneliness, depression, anxiety, guilt, and more. Don’t be surprised by what you feel, and don’t blame yourself for feeling it. Instead, let yourself really feel your emotions and learn lessons from their messages. As you do, you’ll develop resilience that will help you face other challenges in your life well.

2. Grief can strengthen your relationships with caring people around you. When you’re grieving, you’ll notice that some people you know will avoid you, while others will draw closer to you. The grieving process will reveal who truly cares about you. Don’t hesitate to accept help from friends and family members who really care. Spending time with them and opening up to them while you grieve can make relationships with them stronger. The result can be treasured bonds bringing love into all of your lives for years to come.

3. Grief can motivate you to reflect on what matters most. As you reflect on your loved one’s life during the grieving process, you naturally think about the legacy that he or she left behind. Legacies are built as people act on their core values. What mattered most to your loved one, and why? Thinking about that gets you thinking about your own values and why they’re important to you. What kind of legacy do you want to leave when you die so the world becomes a better place because of your contributions? How can you build that legacy day by day? What changes should you make in the way you prioritize your time and energy to live with purpose, intentionally building your legacy? Grief can direct your attention to exploring those vital questions.

4. Grief can spark your curiosity about heaven and help you discover or deepen your faith. Missing your loved one after his or her death naturally makes you wonder about spiritual questions: Does he or she still exist – and if so, where? If your loved one’s soul continues to be active in an afterlife, what’s happening there? Is your loved one still aware of what’s going on in your own life here? Can you stay connected through prayer? Many recent advances in science – from discoveries about the nature of consciousness to research on near-death experiences – support the ancient wisdom of faith that an afterlife does really exist. Every human being is made of energy, and the energy of our consciousness must go somewhere after we die. As Albert Einstein observed, “Energy cannot be created or destroyed; it can only be changed from one form to another.” The pain of missing a loved one who has passed away can motivate you to explore spirituality. What you discover on your journey can lead you to faith in God and heaven for the first time, or deepen the faith you already have. Praying or meditating on your questions can lead you to encounter the loving God who is the source of all wonder. As your trust in God increases, your pain from grieving can decrease.

5. Grief can strengthen your compassion for others. Experiencing the suffering of grieving can open your heart to care more about the suffering that other people experience. St. Elizabeth Ann Seton, the patron saint of grief, experienced the deaths of many loved ones in her own life – including her husband and two of her five children. But as she went through the grieving process each time, she chose to move closer to God rather than farther away from him. That choice to stay close to the source of all love empowered Elizabeth to develop strong compassion for others. She put that compassion into action by founding an influential charity and pioneering school system that have helped generations of people. You, too, can live compassionately as you learn to appreciate the stories in scars that come from grief. Grief can show you how we’re all connected, and why we all need to care about each other.

Grief is never welcome and grieving is never easy. Yet when it happens to you, you can be inspired by it if you approach it with the desire to learn. After a loved one dies, you can experience a new life of wonder from the hope that emerges from grief.