Accident being defined as an attribute or property contingent upon the existence of something else, from the Latin word accidēns, or the Greek word συμβεβηκός (symbebēkos). Do accidents exist in God?
St. Thomas Aquinas addresses this directly in the Summa.
Briefly, there are no accidents in God.
The entire section on The Simplicity of God may help to clarify this, if there's any confusion. The main contributing points, I think, are that God's essence and existence are one in the same, that God is His own essence and existence, and that God is absolutely simple.
There can be no accidents in God but God has created life so that accidents exist for every member of creation. The reason why no accidents can occur in God is already couched in your question, I presume rhetorically.
Nothing in God is truly contingent upon the existence of something else. As God alone is infinite, all that he is is without boundary or parts. Being infinite in knowledge and infinitely wise to decide every best choice in time, before he created time, means for want of better words, God chose everything before anything existed to chose between. As he can not change and can't improve in that decision for want of knowledge or perfection he can't be properly influenced outside of himself.
In time, to our human understanding he appears to be influenced by many things, for example our desire for him, our prayers, etc., but there is much truth to our perception. The only correction needed is that God chose before the foundations of the world that he would be influenced by us at any given movement based on his own properties from eternity in infinite self-sufficiency.
Nature, including humans, are in the opposite position on this point. It's properties and attributes are under the influence of many things especially God. While God can't be influenced man always is.
Perhaps being forgiving and compassionate might be attributes contingent upon something else, namely the existence of an entity requiring compassion and forgiveness. God, in and of himself, requires no forgiveness or compassion for weaknesses, as he has no weakness or sin.
Of course, the argument that being compassionate and forgiving might be an accident could easily be offset by saying that those attributes are really only extensions of love, which would be something that would already exist in God on account of the fact that the trinity already expresses perfect love among it's members.
I would probably have to vote no on this one. It is we who change, not God.