Many have the practice both in speech and in writing to mention Gd or heavenly help with the use of the expressions be’ezrat hashem, im yirtzeh hashem or biseyata dishmaya.
What is the source for this?
Citing from Wikipedia:
The book "Toldot Yitzhak" (‘The Offspring of Isaac’), by Yitzhak Karo, Yosef Karo's uncle, offers the meaning of this custom of writing ב"ה (B"H), at the top of every letter, with accordance to the biblical verse: "In all thy ways acknowledge Him, and He will direct thy paths" (Book of Proverbs 3:6)."
While the source mentions Baruch Hashem, it seems logical that the other expressions are said or written for the same reason, emanating from the same Proverbs verse.
Eliezer and Yitro also used the phrase Baruch Hashem.