If God took you to it, He'll get you through it.
Exodus 14 records the story of how the Hebrews escaped from bondage and slavery in Egypt. On their way out of Egypt, they camped in the desert near the Red Sea. They thought God was leading them out of Egypt. However, Pharaoh led the Egyptian army to where the Israelites were, and he trapped them against the sea. The Israelites must have felt betrayed by God, for it looked as though he didn't follow through on his plan to lead the Israelites out of captivity in Egypt. But God was faithful to his word -- he didn't let his people down. He led them through the Red Sea and delivered on his promises.
You have probably faced times when you thought that you could never do something, never complete a particular task, or never make it to the finish. However, if God has promised you something, then you can be confident that God will get you through the difficult times in order to bring about his promise.
This is true in Joseph's life. God took him through years of pain and suffering for an ultimate benefit; Joseph realizes this and, in Genesis 50:20, says, "You intended to harm me, but God intended it for good to accomplish what is now being done, the saving of many lives." God had a bigger plan for Joseph's life, and God didn't let him down. God led Joseph through his struggles.
This principle is also true in your life. Even though you may be going through extremely painful times, do not fear for God will get you through the hard times you face (see Psalm 23:4). If God took you to it, He'll get you through it.