[verb (dictionary form)] + ことにする [verb ない-form] + ことにする [verb (dictionary form)] + ことにした [verb ない-form] + ことにした [verb (dictionary form)] + ことにしている
ことにする means "decide to": you make the choice yourself. It follows a verb in the dictionary form, or the ない-form for deciding not to. You hear it mostly as ことにした, "I've decided to".
The verb before こと stays in the dictionary form even when the decision is past: ×行ったことにした. The tense goes on する.
In the non-past, ことにする announces a decision as you make it.
ことにしている is a decision you made and keep to: "I make it a rule to".
ことにする is your own decision. ことになる says it was decided for you, by your company, by a group, by how things turned out.
These go beyond deciding to do something.
After a た-form, ことにする means "treat it as if" – you decide to act as though something happened, or didn't.
With a noun, the pattern is にする without こと: こうひいコーヒーにする, "I'll have coffee". ×コーヒーことにする.