Colleagues are people who you meet in business, academics, and every formal situation. Colleagues are co-workers.
Friends are people that we get closer with. We got a few real friends in our life. But we meet a thousand colleagues at work and in classes.
If you don't know the difference between these terms, baby, you are playing it wrong.
For instance, two people are meeting at work. One person is a damn professional and sees the other as just the co-worker. The other person is not into formal living and tries to become friends with the other. The informal person is reading the other wrong, judging, and misunderstanding, and making a drama. When the drama happens, a formal person tries their best to fix the problem by many kinds of steps, but the informal one is creating more drama because of his informality. And the entire project is bleeding now.
So you see, if you do work, you got to stick to the work. No matter what happens in your private life. And if you are doing work, do not drag it to your private life. Imagine if you were gossiping with your colleagues about another colleague, you are ruining that person's entire image at work, and the career of that innocent person is ending. Perhaps your gossip was based on someone's misunderstanding, and that innocent person is not like that. On the other hand, without that innocent person, a project could fail because he or she was the only one who was great at a part of that.
Always keep it professional while being friendly. If you got angry with someone, say sorry without being proud. Always live with saying thank you and sorry.
And communication with everything. Keep in touch with the colleague and say necessary things. What if you are not telling them the details about your situation even when they are asking? Do they have to open their third eye like a monk in the Himalayas? Just keep a better communication with co-workers. Then your colleague can understand the situation and adjust the work along with it.
Be friendly. Be kind. Be fair and humble. Be wise. And do the thing that you have to do.