1)
How was Hashem a refuge for him?
1.
Radak: He saved me from them. I was shielded in His Chesed; they did not do to me like their intent.
2.
Malbim: Since He creates everything, and He is my G-d via His Hashgachah Pratis, He was my refuge.