Genesis 45:5 KJV
Now therefore be not grieved, nor angry with yourselves, that ye sold me hither: for God did send me before you to preserve life.
Joseph displays marvelous grace in forgiving his brothers (after of course trying them to learn their character and of the true well being of his father and brother). He could forgive his brethren for the terrible thing they had done first because he saw it as an act of God not of them and second because he recognized the valuable purpose of it.
The best tools to overcome bitterness and practice heartfelt forgiveness are these:
See all things as acts of God
Even Satan's attacks on Job are also acts of God. I am not saying we should accuse God. He has done nothing but good. I am saying we should see the hand of God.
See the purpose in every event
Likely you won't be promoted from slave to governor or save an entire nation as a result of some trial you face but every event has purpose and for the Christian it is a good one. Find that purpose and focus on it.
If you have done these you have no need to be angry or bitter towards anyone.