Krishna says, "Let man lift himself by himself, let him not lower himself; his self alone is his bandhu (friend/relative), his self alone is his enemy"(6.5). Like friendship, there are many dimensions to this existential verse.
Firstly, this fixes the responsibility on each individual to lift themselves up. The usual tendency is to blame someone else like family, friends, co-workers, circumstances, working conditions, country etc. or blame it on ourselves when karmas are performed which are either labelled as bad or haven't given the desired karma-phal (fruits of action). This leads to many deep rooted grudges and bitterness against others, sometimes lasting for a lifetime. On the other hand, whenever our memory reminds us of our regrets we punish ourselves repeatedly.
Whatever may be the circumstances this verse tells us to lift ourselves up. Krishna earlier assured (3.34) that the teacher (Guru) manifests to help us when we develop the three qualities of prostration, questioning and service.
Secondly, it is overcoming the inadequacy we feel about ourselves by embracing our perfections and imperfections. It could be our physical appearance, chequered past, educational or economic status or pleasant and unpleasant situations faced by us.
Thirdly, when we are friends with ourselves, there is no place for loneliness which is the main reason for depression, anger and addiction to substances or screens. This helps us remain joyful without depending on anyone especially when one approaches old age.
Finally, it's about living a balanced life by taking care of ourselves physically, mentally, socially and spiritually so that each aspect of life is well tended to. Once we befriend ourselves, the natural consequence is that the entire world becomes our friend as we shed prejudices and judgements and we become a friend to the entire world.
Source - Daily World