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.
I answer that, From all we have said, it is clear there can be no accident in God.
First, because a subject is compared to its accidents as potentiality to actuality; for a subject is in some sense made actual by its accidents. But there can be no potentiality in God, as was shown (2, 3).
Secondly, because God is His own existence; and as Boethius says (Hebdom.), although every essence may have something superadded to it, this cannot apply to absolute being: thus a heated substance can have something extraneous to heat added to it, as whiteness, nevertheless absolute heat can have nothing else than heat.
Thirdly, because what is essential is prior to what is accidental. Whence as God is absolute primal being, there can be in Him nothing accidental. Neither can He have any essential accidents (as the capability of laughing is an essential accident of man), because such accidents are caused by the constituent principles of the subject. Now there can be nothing caused in God, since He is the first cause. Hence it follows that there is no accident in God.
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.