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.
If you had no sound reason for carrying out a vasectomy, then this is unlawful as it results in the permanent discontinuation of reproduction. However, you have done the right thing by turning back to Allaah in repentance; please refer to Fataawa 86967 and 86527.
It is good that you repent every time you remember this sin; but if this leads you to fail to achieve what is to your worldly and religious interest, then it is something dangerous and it is a plot of the devil. He desires to do everything to spoil the believer and his life and cause him miss out on what is good for him, especially what is good for him in the Hereafter.
Therefore, you should be careful and you should concern yourself with what benefits you. Ibn Al-Qayyim said in Madaarij As-Saalikeen: “The state of grief: It is not among the required states or the states that we are ordered to experience, even if it is inevitable that one experiences it. Grief is not mentioned in the Quran except that it is prohibited (disliked) or negated. The prohibited kind is like the saying of Allaah (which means): {So do not weaken and do not grieve, and you will be superior if you are [true] believers.} [Quran 3:139] Allaah also says (what means): {…and do not grieve over them.} [Quran 15:88], and there are many verses with the same wording. Also, Allaah says (what means): {"Do not grieve; indeed Allaah is with us."} [Quran 9:40]. The negated type of grief is like the saying of Allaah (which means): {. . .there will be no fear concerning them, nor will they grieve.}[Quran 2:38]
The wisdom behind that is that grief makes life stop and there is no benefit for the heart in it. Also, it is most beloved to the devil that a person grieves so that his grief stops him from doing the good and beneficial deeds he does; Allaah says (what means): {Private conversation is only from Satan that he may grieve those who have believed. . .}[Quran 58:10]
Moreover, the Prophet, sallallaahu ‘alayhi wa sallam, prohibited that two people have private conversation in the presence of a third person, as this makes the latter grieve. Therefore, grief is not required and there is no benefit in it and the Prophet, sallallaahu ‘alayhi wa sallam, sought refuge in Allaah from it as he said: “O Allaah, I seek refuge with You from anxiety and grief.” [End of quote]
Allaah Knows best.