〜ことに(は)
To my (surprise, regret, etc.), …machine translation
FormationAdjective/emotion verb (た-form) + ことに(は)
〜ことに(は)places the speaker's emotion AT THE START of the sentence, before stating the fact: 残念なことに、旅行は中止になった (regrettably, the trip was canceled). By stating the emotion first, the listener knows right away how to receive the news that's coming — this is a somewhat formal expression that leans toward writing.
Connection: な-adjective + な (残念なことに), い-adjective unchanged (うれしいことに), emotion verbs in the た-form (驚いたことに、困ったことに). Adding は to make ことには raises the level of emphasis.
Only words expressing EMOTION can go in this slot — 残念, うれしい, 悲しい, 驚く, 困る, ありがたい… Don't confuse it with 〜ことか: ことか exclaims about DEGREE at the end of a sentence ("how much…!"), while ことに introduces the TYPE of emotion at the start of the sentence ("regrettably, …").
Examples
残念なことに、旅行は中止になった。
Regrettably, the trip was canceled.
驚いたことに、彼は一人でその仕事を全部終わらせた。
To my surprise, he finished that entire job by himself.
うれしいことに、来月給料が上がるそうだ。
Happily, I hear salaries are going up next month.