I have a very important question to ask, the basis of an Itikaf is to partially control the ego & yes the ego does trouble you a lot with unnecessary nonsense & gets to the stage that the person can actually feel something having sex with them & then masturbates. For me this is very humiliating to even say but my fast is invalid but is my Itikaf invalid too? and what would i have to do to compensate? i feel so bad & depressed about it, i made ghusal and prayed 2 rakaat taubah.
Your I’tikaf became void, but you have done what is required. In
addition to those, make up the fast of that day.