I heard a saying referred to Hazrat Ali (R.A).
Saying is almost like that I recognized my lord by my broken determination
You might be referring to Hadith #250 in Nahj al-Balaghah:
Hadith n. 250
- Amir al-mu'minin, peace be upon him, said: I came to know Allah, the Glorified, through the breaking of determinations, change of intentions and losing of courage.
وقال عليه السلام : عَرَفْتُ اللهَ سُبْحَانَهُ بِفَسْخِ الْعَزَائِمِ وَحَلِّ الْعُقُودِ
(Note: the hadith number may vary slightly based on the print of Nahj al-Balaghah you are reading.)