It is not wrong to pray for these things, but it would be better to pray something like this:
Lord, I know you have a purpose for everything you bring into my life, and my prayer is that you would be glorified in whatever way seems best. Please teach me what you want me to learn from this so that my faith will grow. Please help me to see what your sovereign purposes might be, so that I may rejoice in your plan and rely upon your grace. But Lord, if it would be pleasing to you, I do ask that you would bring relief from this pain and healing from this hurt, for this is my desire. Either way, I trust you and I pray that your will be done. I ask this in Jesus’ name. Amen.
This, I believe, is a healthy way to pray. It may not be perfect (I am growing in my understanding of how to pray), but it does display trust, teachableness, and reliance upon God. It also seeks to humbly accept his sovereign plan, whatever that may be. At the same time, there is no hesitation to ask God for the desire of your heart, knowing that if God’s answer is no, or not yet, God will give sufficient grace to meet the challenge.
Our goal in prayer is to see God glorified no matter what. Our goal is to see things his way, so that our will aligns with his. And once this happens, our prayers are filled with power. They will be answered, and with confidence we can say, “We know that we have the requests that we have asked of him” (1 John 5:15). This, my friend, is what it means to ask “in his name.”