Your mistake is that you are claiming that Turkey, like Israel, invaded another nation. Kurdish people lived under Turkey since its foundation; in other words, Turks did not invade their lands. They lived in our country since its foundation, just like they lived here even at the Ottoman lands. The two cases are too different, also because of the reason Burak mentioned. Not all of them want to separate; in fact, most do not. The separatists are less than 1%. I would also let them separate if that solved the problem. But the problem is not that they want to separate, but that there are a bunch of Kurdish terrorists (mostly from Iraq, Syria and Iran) constantly attacking Turkey claiming that their goal is a free land for Kurds, when in fact they are supported by foreign anti-Turkish countries, and arguably, Israel is one of those countries supporting these terrorists. Not sure if this is true, but if it is, and if Erdogan is aware of this, don't be surprised why he bashes Israel.
Israeli troops shoot, injure Palestinian crossing Gaza border fence (Haaretz)
from the article: Turkey: Israel is strategic ally with shared interests