There is this very irritating habit of translating the English expression Oh my God literally into Irish. I must regrettably tell you that the result is not natural or good Irish. I would never use it – in fact I very much prefer Ó-maigh-ó or some other Irish transliteration of the English “Oh my!”, because that is what you see in modern Irish literature written by native speakers. The translation is bad even because you don’t address people or God that way. In English you say my good man, my friend, my God and whatever, i.e. you introduce your term of address with my, but in Irish it’s the vocative a: a fhir úd, a chara, a Dhia.
Is it then allowed to say Ó, a Dhia? Well at any rate it’s a huge improvement on the word-for-word translation, which I don’t reproduce here. But if you want a traditional expression, say Dia dár réiteach!
Am I being pedantic? No. I tell you to read the books. If you read books by native authors, this sort of thing will be quite obvious to you. Personally, I find it rather exasperating that I should need to point out such stuff.
PS: Mícheál pointed out in the comments box that you could also say th’anam ‘on diabhal. Yes, quite so, and I guess th’anam ‘on diocs is fine too.