This grammar should be used at the head of the sentence. It should be used to emphasize feelings, emotions, or sentiments.
Example #5935 does not belong in this entry. This must be "koto ni (ha)." Also, you can only use the plain past tense of a verb before it, not plain dictionary form.
I think the English translation should be better with 「The 〜 thing is that, .....」for 「〜ことに」. So for ex#310 嬉しいことに、四月から給料が一割ほど上がる 「The happy/hearthening thing is that, from April onwards my salary will go up by around 10%.」I prefer to use "hearthening" in this case. Notice the comma is at the ことに ex#5256「The unfortunate thing is that, I dropped and lost all my change through a hole in my pocket.」