With life, I don't think the solution is to just settle for less than happiness. You have the ability to choose who you want to have around you because you can create your community and dictate your decisions. You are born into a family. However, you get to chose your "family" through your life through who you choose to associate with.
No. I'm not telling you to be a bad person and leave an individual when the going gets rough. Be there for them and help. Most people are worth it, and they deserve love and your caring. If someone is willing to stick with you thick and thin, then the relationship is a beautiful thing. However, sometimes in the worse scenarios, you get to see someone's true nature. Understand that some people might have different interests, feelings, and mindsets. Love and friendship are often the things that keep relationships together and build the bridge through understanding and mutual caring.
However, in the cases that an individual is not caring or considerate towards you, you should begin to re-evaluate the relationship. Relationships should be mutual. If you are putting in much much more than they are putting in towards you, are they actually being a considerate person? And, sometimes people are way too different to understand each other and properly connect. However, that's when communication needs to come in to understand. No one really fully understands another person, but with communication and voicing opinions, the gap of misunderstandings or lack of understanding closes.
If you begin entering a situation, in which you feel like things are mutual, communication is everything. It is so important to try to solve the situation at the root of the problem and talk with the individual. But, some individuals are like walls. They don't listen. And, if they aren't listening, are they actually being a considerate person? If you keep trying and trying and nothing is changing, then sometimes it's not a "you problem." It's a "them problem." Relationships are mutual. And, if they aren't putting in the work or effort to fix the disconnect in the situation, stop.
Know that it's sometimes better for your life and better for your mental health to just let go and start again and anew. Sometimes you just need to know when to burn some bridges because not all bridges can last or are worth keeping. Remember that you are your own number one, and self-love is very important. Mental health is not treasured as much as it needs to be oftentimes. But, mental health and happiness are often the best things and the only things that keep life worth living. Surround yourself with people who love you and you love.
I think the most important rule of thumb is that if they don't add anything to your life and take away, drop them.