I broke my oath to Allah on my heart (without saying it). Should I offer an expiation?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Perhaps you mean that you intended an oath in your heart without verbalizing it (saying it) and then did the thing that you had sworn not to do (or vice versa). If this is the case, you should know that one of the conditions for a valid and binding oath is to verbalize it. According to the majority of the scholars, an oath that is merely intended in the heart and was not verbalized is not binding.
In the context of mentioning the conditions of a valid oath, the Kuwaiti Encyclopedia of Fiqh reads, "The fourth condition: verbalizing the oath. According to the majority of the scholars - and contrary to some Maaliki scholars - inner thoughts are not sufficient to establish a binding oath..."
Accordingly, you are not required to offer Kaffaarah (expiation).
Allah knows best.
You can search for fatwa through many choices