My mind keeps wandering in prayers. Because of this reason I keep forgetting if I recited tashhahud after 2nd rakat (in a 4 rakat namaz). I usually recite the prayers again (if I feel I forgot the tashhahud) but want to know if I don't pray again will that be ok? What is the ruling?

If you get doubt whether you have recited Tashahhud or not and remembers before the Ruku for next Rakat sit down and recite it but if you have done Ruku ,then after completion of Salat ( Tashahhud and salam ) without doing anything which can break your Salat, perform two Sajdah ( with the Niyyat of Sajdah e sahv) and again recite Tashahhud and salm and finish your Namaz. No need to pray again.