All that misery, all that problems were China's own doings not damage inflicted by external powers. Regarding invasions, why couldn’t it be sorted out by Diplomacy or at least keep it out of Chinese territory?
India too has border disputes and India too is hated by countries like Bangladesh and Sri Lanka. And India too faced the menace of Maoist insurgency - first in 1960s and later in 2000s and also secessionism in Punjab and North-East. But India never let all this disrupt internal peace and stability.