First, you find ways that you absorb energy. That could be from others, but it is better to find activities that nourish your soul without relying on others. If we rely on others for our energy totally, we have in effect given control of our energy to others, because if they don't give us any, we go without. This doesn't mean that you can't turn to friends for support during times where you need to - in fact, you are more likely to get more from them if you are not constantly taking it from them. Find those people who light you up, who make you feel bigger and better. When you interact with others you should BOTH feel better for it - if not the balance is wrong.
You can also instead find things that light you up - it might be a walk in woodland, dancing, painting, running - anything that you feel good after you have done it, and you can stay in the moment while you are doing it - that is good energy and will replenish and nourish you.
Second step is to protect the energy that you now have lovingly generated. This doesn't mean pulling away from others, but establish some boundaries of how and when you give that energy away, to make sure that you don't give away too much and you don't leave enough for yourself. As well as those boundaries keeping your energy in, they also keep negative energy out - for example, if someone is trying to make you feel guilty, or angry, or give you pain, then establishing an energetic barrier can really help in making sure that you don't absorb that and let it affect you. It also has the added effect of reflecting right back onto themselves, making them experience whatever their intention was for you. You can imagine a mirror that sits in front of you, and you can activate the mirror to reflect back any energy that feels harmful to you. Eventually, they realise the words or emotions are not hitting their target, and also the effect of those because they experience instead.
You don't have to be particularly spiritual to know that you need to protect yourself from others, from toxic relationships or connections that make you feel crummy.