When I look at the story of Joseph, it's quite clear from the start that although, Joseph was mistreated by virtually everyone he met including his own brothers and even his own family. One thing was very clear Joseph was favoured by God. When you have God on your side who can really be against you ? ( Romans 8:31 ) The whole world could come against you but if God, the one who created the universe, the one who created the beings who hate you is for you, who can really be against you?
That is what Joseph recognized that despite the false accusations and assumptions about him by others, God always favoured him and it was this recognition of the favour, grace and mercy of God in his life which gave him the ability to forgive and help his brother's. Genesis 50:21. Joseph realized that God allowed his brothers and other's to mistreat him, so that it would save them from the famine. God will always use mans/woman's evil as an act of deliverance and salvation. They intended to do evil against you, but God intended to use that very evil for Good. Isn't God so amazing?!
Jesus preached in Luke 23:24 " Father forgive them, they know not what they do. The truth is when people mistreat you it's because they do not know better. Seriously, if they knew better they would do better. People often mistreat others because of their own lack of self worth, self love and straight up jealousy like we see in Josephs case. They have thing's in them that they need to heal that they haven't addressed so it's best to forgive them pray for them and move on. I know it's hard to forgive those who have hurt you, mistreated you, used you and abused you or even tried to kill you but the Lord says in Colossians 3:13
" 13 Bear with each other and forgive one another if any of you has a grievance against someone. Forgive as the Lord forgave you.
To be a follower of Jesus Christ is to be "Christ like" you can't be Christ like if you haven't forgiven your enemies. You can't truthfully call yourself a christian if you are holding on to bitterness, and you can't truthfully preach and minister the word of God to other's if you are holding on to what the enemy and his children have done to you. The truth is, that it is written in the book of Isaiah that no weapon formed against you shall ever prosper, so believe it. God knew who would do what to you before you were even born, and God is not going to allow wicked people to get away with their deeds so give it to God, the bible says in
7 Be not deceived; God is not mocked: for whatsoever a man soweth, that shall he also reap.
8 For he that soweth to his flesh shall of the flesh reap corruption; but he that soweth to the Spirit shall of the Spirit reap life everlasting.
9 And let us not be weary in well doing: for in due season we shall reap, if we faint not.
God is the God of vengeance and he will show up and fight for you, focus on doing good and fulfilling your purpose in the Kingdom of God and God will do the rest.