You raise a good question, and a profound one at that!
I'm glad you acknowledge God created us in His image by giving us a free will. Some Christians believe that "free will" does not really exist. They reason if God is truly in control of His creation, if He is truly sovereign, then free will is simply an illusion. According to them, regardless of what we do, whether good or bad, our actions are in a sense out of our control and under God's control. In other words, God's will will come to pass, regardless of what we do or don't do.
As with many errors in thinking, this view of free will has an element of truth to it, to wit: there are aspects of God's will which cannot be changed, altered, or frustrated. Call these aspects of His will whatever you like; the truth is, God will ultimately have the "last word" regarding the "big picture" and His grand plan of redemption for the human race. No one and nothing can stand in His way:
"In Him we were also chosen, having been predestined according to the plan of Him who works out everything in conformity with the purpose of His will" (Ephesians 1:11, my emphasis).
In light of God's ability to work out everything according to His will, we might be tempted to ask, which you seem to be doing in your question, "Then how can we have free will if it does no good to resist His will?" That is almost exactly the same question Paul raised in Romans 9:
"Then why does God still blame us? For who [can resist] His will?" (v.19).
In one sense, the answer to that question is "No one!" In another sense, however, God gives all humans a limited free will, such that our lives and the lives of the people around us can be made better or worse depending on the quality of our free-will choices.
A wise man once said, "Free will does not mean we are free to choose the consequences of our decisions." For example, we are free to commit sexual sins, but one consequence of doing so may be to contract a fatal disease such as AIDS, which no one in his right mind would choose beforehand.
Contracting AIDS is not so much a punishment by God as it is a consequence of having free will. The saddest cases of AIDS, in my opinion, are the babies who are born with the disease. They are innocent victims of their parent's (or parents') bad choices. Who is to blame? God? Of course not.
Regardless of whether our decisions are good ones or bad ones, however, God's ultimate will will ultimately "be done [one day] on earth as it is in heaven." We know Christ taught us to pray "Thy kingdom come, Thy will be done, on earth as it is in heaven." While He therefore expects His church to work toward that end, He knows that our obedience to His will, at best, will be only partial. Does this hinder God in any way from bringing history to a close and ushering in "a new heaven and a new earth , the home of righteousness" (2 Pe 3:13)? No.
God gave us, His creatures, free will because He loves us and because He desires our love in return. God does not need our love to "complete" or "fulfill" Him, since He is already complete and perfectly fulfilled in Himself. Moreover, for Him to "force" us to love Him would be unworthy of God. He therefore put some power of decision into our hands--we call that free will, and stood back to see what we would do. Did He know in advance we would disobey? Yes. Did His knowing we would choose to sin cause us to sin? No.
In conclusion, God will one day judge all of us, believers and unbelievers alike, with fairness, justice, righteousness, and impartiality. Until then, unbelievers in particular punish themselves and others through their willful disobedience to their God-given consciences, which can at times become seared and useless.
On the other hand, God punishes true believers who have become His children through the new birth (Jn 3:3,7; Tit 3:5). We call this process "divine discipline" (see He 12:4-11; cf. Pr 3:11,12).
As a father of two children (now grown), I can only agree with God's kind of loving discipline, or "tough love," in that it was critical in the rearing of my children. Had I refused to discipline or punish my children, I would have been a poor father indeed, and my children would almost inevitably have caused me shame and disappointment, tears and heartache. As the writer to the Hebrews puts it:
" . . . we have all had human fathers who disciplined us and we respected them for it. How much more should we submit to the Father of our spirits and live! Our fathers disciplined us for a little while as they thought best; but God disciplines us for our good, that we may share in his holiness. No discipline seems pleasant at the time, but painful. Later on, however, it produces a harvest of righteousness and peace for those who have been trained by it" (12:9-11).