All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
You should fear Allaah, the Exalted, give up this sin, and turn to Allaah, the Exalted, in sincere repentance. When the person takes a vow to give up sins, his vow is not valid or binding because he is already obliged to give up sins by the Sharee'ah, and he is in no need of taking such a vow. Moreover, when the person takes a vow to do an obligatory act, then his vow is not valid or binding because it is already obligatory on Muslims who are competent for religious assignments. In principle, the vow is to do a recommended—not obligatory—righteous act that brings him closer to Allaah, the Exalted. Khaleel said, "A vow is considered binding and valid when the person makes a vow to do an act that is recommended..." [Al-Mukhtasar]
Hence, you should turn to Allaah, the Exalted, in repentance, seek His forgiveness, and give up sins and misdeeds. According to the opinion of some scholars, it would be better and more prudent in terms of clearing you of your liability to offer an expiation like that for breaking an oath.
Allaah Knows best.