Are 突然に and 突然のことで just different ways to say the same thing?
- 突然に (suddenly) is mostly an adverb in the literal sense of the word, which is to say it usually modifies verbs and describes a certain aspect (namely, suddenness) of the way the actions denoted them take place.
チャンスは突然(に)やってくる。(Opportunities come suddenly.)
電車は突然(に)停止した。(The train stopped suddenly.)
As indicated by (), the に can be (and often is) omitted.
- 突然のことで is an adverbial phrase that modifies clauses and serves to give the reason/cause (that is, the reason/cause of suddenness) for the particular events or situations expressed by them.
突然のことで、なんと申し上げてよいか言葉もありません。(It being so sudden, I have no words at the ready to offer.)
突然のことで申し訳ありません。(I am sorry for it being so sudden.)
突然のことで、驚きました。(I was startled by the suddenness of it.)