I decided to use the resources of the Digitales Wörterbuch der deutschen Sprache (DWDS), specifically the linked literature corpus, to search for the phrase du lieber Himmel in pre-1945 publications.
Here is a link to the results, assuming a direct link is possible.
Among the results and merely checking the authors, I find
- Franz Rehbeim from Neustettin (now Poland, then eastern Pommerania)
- Ludwig Ganghofer from Kaufbeuren in (Bavarian) Swabia
- Kurt Tucholsky born in Berlin
- Felix von Luckner from Dresden in Saxony
- Franz Kafka from Prague
- Josef Winckler from near Rheine; the northwest where the current border of Lower Saxony and Rhineland-Westfalia is
- John Knittel, born in India to a Swabian and a South Tyrolean parent and who held Swiss nationality
- Eduard Rhein from Königswinter in the Rhineland
- Anna Seghers from Mainz
With such a list spanning a large circle around the entirety of the German-speaking area, I would deem it rather safe to say that the phrase was commonly used across all of Germany, German-speaking Switzerland and what was Austria prior to World War I, not allowing you to draw any conclusion to confirm or deny your grandmother’s origin.
Note that I did not cherry-pick the different locations and that I observed no clustering anywhere. At best, one might point to a lack of central Germany (Franconia, Hessia, Thuringia) in the list but I suspect that to be inadequacy of the corpus rather than that area not using the phrase.
Even nowadays, I would consider the phrase to be sufficiently common across the entire German-speaking area to not allow geographic conclusions.