Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
We are commanded to pray and fast and we are physically capable of doing so. However, we are also commanded to have sincerity (ikhlas). This is an order to attain an internal state which we are not physically able to obey. What should we do?
In this regard you are required to do three things:
To plead with Allah that He bestows you with sincerity;
To constantly check the level of sincerity in your heart;
To love to attain it and to love those who have attained it.
You can also read this Prophetic prayer which is a protection from riya’ (ostentation):
الَّلهُمَّ إِنِّي أَعُوذُ بِكَ أَنْ أُشْرِكَ بِكَ شَيْئاً وأَنا أَعْلَمُ وأَسْتَغْفِرُكَ لما لا أَعْلَمُ
Allahumma inni a’udhu bika an ushrika bika shayan wa ana a’lamu wa astaghfiruka lima la a’lamu
“O Allah I seek refuge in You from knowingly associating partners with You in any way, and I seek Your forgiveness for that which I do not know.”
(3 times in the morning and 3 times in the evening).
Also, read Surat al-Ikhlas in abundance.