You're right; the Bible does command us to love even people who are hard to love. Jesus said, "Love your enemies, do good to those who hate you. ... If you love those who love you, what credit is that to you?" (Luke 6:27, 32).
But how is this possible? As you have discovered, it's one thing to know we ought to love someone who is difficult to love—but it's hard to actually do it. In fact, I don't believe it's possible for us to love others the way we should without God's help. The Bible says, "Dear friends, let us love one another, for love comes from God" (1 John 4:7). Remember: Love isn't just an emotion, but a deliberate decision to do what is best for someone.
By nature, we all tend to put ourselves first—and when someone gets in our way, we react in anger instead of love. But when Christ comes into our hearts, He begins to replace our selfishness with His love. We begin to see the person through God's eyes, and we learn to love and forgive him/her the same way God loves and forgives us—freely and fully, in spite of our faults.
Pray for those you find difficult to love; one reason they are this way is because they lack the peace and joy that come only from knowing Christ. Then ask God to help you begin to see them the same way He does. Remember, He loves them so much that He was willing to send His only Son into the world to die for them—just as He did for you.