Separating from the act means not being a direct or indirect part of the sin. I would not walk with a friend who is a gay/lesbian in the pride parade for example, but I will certainly go to lunch with them and keep up on their lives. I will rejoice in their accomplishments and happiness and cry with them when they ache. We have never been asked to not be a friend. Don't think you need to walk away from these family members and friends! Don't believe for one second that God is asking you to make a choice between He and them. Satan wants you to believe that is the only choice, but it most certainly is not! God wants you to serve and love Him first and be there for your brothers and sisters second. Just because I'm not supporting same-sex marriage doesn't mean I'm not loving the individuals. I believe in Eternal Families and in the gift of procreation. Both are divinely appointed by God and lead to Eternal progression. I desire that of all my brothers and sisters. When that's not the course they choose, I am indeed sad. It doesn't change my love for them, however.
When Alma was at the Waters of Mormon, these were the covenants he required them to take upon themselves in preparation for baptism:
8. And it came to pass that he said unto them: Behold, here are the waters of Mormon (for thus were they called) and now, as ye are desirous to come into the fold of God, and to be called his people, and are willing to bear one another’s burdens, that they may be light;
9 Yea, and are willing to mourn with those that mourn; yea, and comfort those that stand in need of comfort, and to stand as witnesses of God at all times and in all things, and in all places that ye may be in, even until death, that ye may be redeemed of God, and be numbered with those of the first resurrection, that ye may have eternal life—
10 Now I say unto you, if this be the desire of your hearts, what have you against being baptized in the name of the Lord, as a witness before him that ye have entered into a covenant with him, that ye will serve him and keep his commandments, that he may pour out his Spirit more abundantly upon you?
In nowhere did Alma say we only needed to comfort, mourn with or bear the burden's of others so long as they are members for the LDS church and living perfect. He meant all people.
Unless others' choices are harming you or your family directly, there is never a reason for doing anything other than loving and showing compassion. You can love and be there for any person regardless of their choices. You will never have to make the choice between loving someone and living God's laws. Love brings true joy!