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, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
The hadeeth in reference is not Saheeh; rather, it is fabricated, as underlined by Al-Albaani in his book As-Silsilah Adh-Dha‘eefah no. 518.
I‘tikaaf is a Sunnah, not an obligation; so if all Muslims were to refrain from observing it, none of them would bear a sin for that. Observing I‘tikaaf is only obligatory when the person makes a vow to do so. Ibn Qudaamah wrote:
"Abu Al-Qaasim said, 'I‘tikaaf is a Sunnah unless one makes a vow to observe it. In this case, he is obliged to fulfill his vow.' There is no difference of opinion among the scholars in this regard, praise be to Allah. Ibn Al-Munthir said, 'The scholars unanimously agreed that I‘tikaaf is a Sunnah and that it is not obligatory unless a person obliges himself to do that by making a vow, in which case it becomes obligatory on him.' What proves that it is a Sunnah is the fact that the Prophet, sallallahu ‘alayhi wa sallam, used to observe it as a means to draw closer to Allah and seeking after its great rewards. His wives also observed I‘tikaaf in his lifetime and after his death. What proves that it is not an obligation is that the Companions did not (all) observe I‘tikaaf, and he did not command them to observe it except for those who wished to observe it." [Al-Mughni]
Many scholars held that it is recommended for the Muslim to hold the intention of I‘tikaaf whenever he enters the mosque in order to earn its virtue. No hadeeth has been reported to this effect, though; rather, it was the personal opinion of those scholars that it is favorable. Shaykh Al-Islam Ibn Taymiyyah, on the other hand, did not hold that this is recommended. Shaykh Ibn ‘Uthaymeen preferred the opinion that it is not recommended. He was asked, "Some scholars said that the person should hold the intention of I‘tikaaf whenever he enters the mosque; is there evidence supportive of this view?"
He replied, "This view is not supported by any evidence, because the Prophet, sallallahu ‘alayhi wa sallam, did not prescribe it for his nation by his action or statement. Rather, he used to observe I‘tikaaf in the last ten days of Ramadan in pursuit of Laylat Al-Qadr (the Night of Predestination)."
Allah knows best.