It was definitely not the right move to send Pathan back. Just because he has been struggling with his bowling of late does not mean he does not have a very valuable contribution to make with the bat. He scored 111 against the Rest of South Africa in the first innings and played a great innings in the second innings too. His batting form is superior to Tendulkar, Jaffer, Sehwag etc at the moment - and his being left out can cost India dearly, especially now they will have to rely on their batsmen -as the pitch does not really assist bowlers- in order to win the match in Durban. The same may be the case in Cape Town.
I think Pathan's morale is really being affected when he is left out despite performing with the bat. I would at least have let him play the last two tests - then he can go back to India and focus on bowling.
Also, I don't see why Pathan is being sent back and Harbhajan isn't? Harbhajan hasn't bowled or batted nearly good enough to warrant him a place in the last test- if it is necessary for Pathan to play domestic games then even more so it is necessary for Harbhajan.