What is the ruling on swearing oaths that one may say without meaning it, or by way of a threat?
Question

I want to know what the ruling is on oaths such as “By Allah, I will not forgive him” or “By Allah, you will make it a tragic day” or “By Allah, I will show him,” and so on. I want to know what the ruling is if that is said with the aim of threatening only, without meaning it as an oath. I hope for a quick response.
Praise be to Allah.The oath that is to be taken seriously and that is binding is the oath that the person intends as such and means it. As for the oath that is uttered without meaning it, that is unintentional, and no expiation is required for it if it is broken.
Allah, may He be Exalted, says (interpretation of the meaning):
{Allah will not impose blame upon you for what is unintentional in your oaths, but He will impose blame upon you for [breaking] what you intended of oaths. So its expiation is the feeding of ten needy people from the average of that which you feed your [own] families or clothing them or the freeing of a slave. But whoever cannot find [or afford it] – then a fast of three days [is required]. That is the expiation for oaths when you have sworn. But guard your oaths. Thus does Allah make clear to you His verses that you may be grateful}
[al-Ma’idah 5:89].
And Allah, may He be Exalted, says:
{And there is no blame upon you for that in which you have erred but [only for] what your hearts intended}
[al-Ahzab 33:5].
Al-Qurtubi (may Allah have mercy on him) said:
The scholars differed regarding the oath that is unintentional. Ibn `Abbas (may Allah be pleased with him) said:  It is what a man says as he is talking to emphasize a point, so he says: No by Allah, and Yes by Allah, without meaning it as an oath.
Al-Mirwazi said: The definition of what is unintentional in oaths on which the scholars are agreed is that it refers to the unintentional oath in which a man says No by Allah, and Yes by Allah in conversation, without intending to swear an oath.
Ibn Wahb narrated from Yunus, from Ibn Shihab, that `Urwah told him that `A’ishah, the wife of the Prophet (sa), said: “The unintentional oath is that which is uttered when arguing, or when not being serious or in jest, or a statement that one does not really mean.
In al-Bukhari it is narrated that `A’ishah (may Allah be pleased with her) said: “This verse – {Allah will not impose blame upon you for what is unintentional in your oaths } [al-Ma’idah 5:89] – was revealed about what a man says, namely No by Allah, and Yes by Allah.
End quote from Tafsir al-Qurtubi, 4/17.
Ibn Kathir (may Allah have mercy on him) said:
The unintentional oath is what a man says in conversation without meaning it, namely No by Allah, and Yes by Allah. This is the view of ash-Shafa`i. It was also suggested that it refers to when someone is joking; or when someone swears to commit a sin; or swears an oath regarding something that he thinks is most likely to be the case – which is the view of Abu Hanifah and Ahmad. It was also said that it refers to an oath uttered in anger, or out of forgetfulness. And it was said that it refers to an oath to give up certain kinds of food, drink or clothing and the like, and those who suggested that quoted as evidence the verse: {do not prohibit the good things which Allah has made lawful to you} [al-Ma’idah 5:89].
The correct view is that it refers to an oath that is uttered without meaning it, based on the verse {but He will impose blame upon you for [breaking] what you intended of oaths} [al-Ma’idah 5:89], which refers to oaths that you meant and intended as such.
End quote from Tafsir Ibn Kathir, 3/173.
Based on that, no expiation is required for the oath that you do not mean; rather you say it as a matter of habit without intending it, because you are used to doing that and you do not intend to swear an oath as such.
As for the oath that you intend and say deliberately, then expiation is required [if you break the oath], whether you meant to commit yourself to it or meant it as a threat.
The Permanent Committee for Academic Research and Ifta’ was asked: We have the habit, if one of us wants to threaten his son or his younger brother or his enemy, he says: By Allah, I will kill you. In this case, he intends it as a threat. What is the ruling on that?
Answer: If he swore the oath by Allah that he would kill his son, it is not permissible for him to kill him, but he must offer expiation for breaking the oath (kaffarat yamin), which is feeding ten poor persons, or clothing them, or freeing a believing slave. Whoever cannot do that must fast for three days.
Permanent Committee for Academic Research and Ifta’
Shaykh `Abdullah ibn Ghadyan, Shaykh `Abd ar-Razzaq `Afifi, Shaykh `Abd al-`Aziz ibn `Abdillah ibn Baz.
End quote from Fatawa al-Lajnah ad-Da’imah – Vol 1. 23/149.
And Allah knows best.