When you have parents who are deeply unhappy with themselves, you don't get to see what it is like to be happy.
You don't get to learn what happy people do. You identify with your parents because they are your role models. You emulate them consciously and unconsciously.
Sometimes your role models are so poor that you are not given enough positive regard that you need for self-acceptance.
Are you doomed to continue the same miserable life ? Can you realize that you are not your parents?