Edward Teach knows who he is. i think this might be a bit controversial in the analysis perspective, because the idea of Edward teach, fractured identity, doesn't know who he is, is pretty prevalent, but i think this comes from a fundamental lack of familiarity with the experience of being non-white in white society.
what Ed struggles with is the ability to find a landing zone where he can stop code switching. sure, Ed is a social chameleon and changes things up depending on who he's with, but this is a common strategy for people of color in survival mode - managing expectations, experiences, and presentation are essential for not just surviving but thriving in a white world, and that's what we see with Ed -
he's Blackbeard the charismatic celebrity pirate when he first meets the crew because he's putting on the job. he's Jeff the Accountant when he's trying out finer things and high society. he's Blackie with Calico Jack, his oldest living tie to the past, a man who went through hell with him in their youth and a man who clearly thrives on high adrenaline high aggression masculinity. at the end of season 1, he's the Kraken for Izzy, pouring on the danger to keep a known liability at bay (Izzy has betrayed him twice, now. Izzy is a liability) and this isn't a sign of fractured identity, this is a sign of a man who has never been able to show all of himself to anyone and be accepted, and a man who knows he must be in community with others to survive.
no pirate stands alone. you're in a crew, you're a captain, you're a first mate, you're something to someone at all times. Ed can't be on his own if he wants to survive as a pirate, which is all he knows, but he also can't find peace as a pirate, because he isn't known. its not that he doesn't know who he is. he's all of these identities.
it's that it isn't until he meets Stede that he finds a place where he can show all of himself. That's why they bond so closely - they're able to connect because they have common interests. Because Stede isn't scared of Ed, and when he learns more about him he's curious, he asks questions, he shares. Ed is able to relax and share more of himself, to the point that when he panics, he shares too much. He gets nervous. That's why he wants to leave in episode 7 - he has shown too much and they haven't talked about and Ed hasn't been that vulnerable with anyone in a long time.
But then Lucius helps him see that Stede likes him, that Stede is doing this whole outing for him, that everything is good, and he's settled again. And then in episode 8, he's nervous again, because he codeswitched to hang out with Calico Jack, to enjoy some of the old bygone times, and without the context of the conversation Stede and Calico Jack had and the context of Stede's background, he's left to assume that Stede has seen that Ed isn't classy and doesn't like him anymore. So he backs off.
But he comes back, and knowing himself and what he wants is why Ed can walk away from his whole life to be with Stede. Because he knows himself and what he wants. He starts the season knowing himself and what he wants and how he feels - Ed's arc in the first season is not about finding himself but about opening up, settling into his skin, and understanding where he wants to go next. Stede's arc is coming to terms with what he's done, and then finally gaining base knowledge of himself. Stede and Ed are on totally different levels throughout the season, because Ed knows who he is. He just doesn't know how to navigate to where and who he wants to be next.
So all of this said? At the end of the finale, Ed loses sight of who he is. He regresses and falls back because it's easier to be feared than laughed at, and because Stede has broken his heart and Izzy has made it clear that no one will ever stand by all of him, so he might as well be the self that still has people.
But Stede didn't reject Ed. Stede ran for his own reasons. Which means when he comes back to Ed, when he fights his way back to Ed, he's not going to be all, oh darling I can help you sort out your identity. He'll be like oh my fearsome darling, you really are beautiful as he looks at Ed's frankly terrifying visage (or exhausted visage, who knows how long it will have been since this man took a nap) and he's going to be fully accepting of who Ed is. Because Stede knows and loves Ed for who he is. He's seen him violent. He's seen him aggressive. He's seen him vulnerable, soft, sweet, sorrowful, overjoyed. He knows Ed.
When Stede comes, he won't be fixing Ed. It's not Stede's place to fix Ed. It's Stede's job to walk beside Ed, and be at his side, (and apologize) and navigate with him the pitfalls and ups for their relationship, and continue to be the first person that Ed Teach could ever be all of himself with.