Imam al-Tirmidhi has classified this Hadith as Hasan (sound). (Ibid and Tuhfatul Ahwazi vol.5 pg.489) and Imaam Hakim has classified it as Sahih (authentic). Hafidh al-Dhahabi (RA) has also attested to this. (Mustadrak al-Haakim vol.4 pg.146)
Similar narrations from various other Sahaabah have been recorded by Imaam Abu Dawud Hadith3672, ibn Habbaan in his Sahih Hadith5357 and others. (refer al-Targheeb vol.3 pg.265-266)
Hafiz al-Munaawiy (RA) while commentating on this Hadith mentions, ‘The reason for Salaat being specifically mentioned is that it is the highest form of worship. And if is not acceptable in such a state the other acts of worship are more likely to also be unacceptable.’ (Faydhul Qadeer vol.6 pg.158).
Note that Du’aa is also an act of worship. However, as is evident, this Hadith discusses intoxicants only. Whether the same applies to all other Haraam items as well remains ambiguous though there is a strong possibility.
However, it should be borne in mind that the one who makes sincere Tawbah [repentance] is like he who hasn’t committed the sin at all. Therefore, one should become despondent and leave out his Salaat for 40 days just because he had consumed Haraam. Instead, he should make sincere tawbah (repentance) and continue with his acts of worship.
and Allah Ta’ala Knows Best
Moulana Muhammad ibn Moulana Haroon Abasoomar