The sentence structure is AはBだ meaning “A is B”.
一番 means “number one“ or “the most“.
いけない means “bad” which is a softer way to say 悪い.
The の particle is used to change the preceding word into a noun.
So 一番いけないの means “the worst thing”.
自分 means “I” or “me” which is more objective than the first person pronouns like 私.
なんか is used to make the preceding word seem unimportant. So 自分なんか is like “someone like me“ in a humble way.
ダメ means “hopeless” or “worthless”.
だ is the auxiliary verb which makes the statement declarative. It’s used with a noun or na-adjective.
って is the casual form of the quotation particle と which works as quotation marks or the conjunction “that” used with a verb like “say” or ”think” and 思い込む means “to think” with certainty of one’s beliefs, so 自分なんかダメだって思い込む means “to think that I’m worthless“.
こと is also used to change the preceding word into a noun just like the particle の, so 自分なんかダメだって思い込むこと means “thinking that I’m worthless”.
こと and の are interchangeable in many cases but when you use it with だ or です, you can only use こと. So the こと in the B part cannot be replaced with の whereas the の in the A part ( 一番いけないの) can be replaced with こと but you tend not to repeat the same words in a sentence so の is better as こと is used later in the predicate.
Lastly, よ is the sentence ending particle which is used when the speaker is trying to tell something the listener should know.