If you are someone who believes that your identity is decided by the people around you, then there are high chances that you lose yourself around people. If you feel your identity is referenced externally, you will tend to prioritize your relationship with others over everything else. To avoid this, you need to shift your perspective from the external world to your internal one. Spend time with yourself and find out what you want. Concentrate on how you see yourself, and try to analyze your personality without taking the opinions of others into consideration.