It seems as though you are coming to the realization that simply attending a church service will not help you develop relationships. Sometimes, especially in large churches, it takes some extra effort to get to know others. Some good ways to meet more people and begin friendships are to join a small group, Bible study or Sunday School class; serve in a ministry where you can meet people in similar situations like working in the nursery, helping in the office or singing in the choir; or finally, contact your pastor or the church office and ask to be matched up with some people to whom you might reach out in friendship.
First and foremost, use this time of loneliness to draw even closer to Jesus Christ, your very best friend. “How great is the love the Father has lavished on us that we should be called children of God” (1 John 1:3). Ask Him to meet your needs both emotionally and spiritually. He has allowed this difficult time in your life for a purpose. Allow Him to teach you and lead you as you go through it.