Sometimes the ways of God are hard to understand, especially when He doesn't order life as we think it should be. But those who love the Lord the deepest are those who remember that God always knows best and He always does what is best for His children.
2 Corinthians 4:17-18 For our light affliction, which is but for a moment, worketh for us a far more exceeding and eternal weight of glory; While we look not at the things which are seen, but at the things which are not seen: for the things which are seen are temporal; but the things which are not seen are eternal.
The Apostle Paul tells us that our focus shouldn’t be on trials of this life but on the glory of the next. That doesn't mean that we don't hurt or won't have problems. It helps us to keep things in perspective. What you are facing today is temporal. We’re just passing through on the way to Heaven and Heaven is eternal.