EU membership is based on treaties so in principle the successor state would still be a member (and France certainly remained a member of the EC after the independence of Algeria…). Any other state would need to be admitted to the EU if not through the regular accession procedure, at least through some ad hoc agreement with all current members.
But in reality, such a break-up would be such a momentous event that it would certainly be handled at highest level, in the European Council, on a case-by-case basis. And if all members agree, it's always possible to find some sort of solution, if needed by amending the treaties or creating new ones (cf. everything that has been done during the ongoing Euro crisis). The rest does not matter all that much.
And therein lies the rub: Some current members, first and foremost Spain, are very hostile to giving EU membership for breakaway regions, for fear of bolstering similar movements in their own country. Case in point, Mariano Rajoy, Spain's current prime minister repeatedly stated publicly that Spain would not allow Scotland to remain in the union in case it became independent and did it again last week. That means that even the regular route to membership could be closed in such a scenario (current members can basically veto a candidacy indefinitely, like Greece and Bulgaria are doing to Macedonia over the name of the country).