Both of your suggested sentences are incorrect. You want to talk about a hypothetical situation: to do this, for most sentences you simply backshift the tense, in the same way that you would for reported speech. As you will see from this link, simple past goes to past perfect:
you worked hard - simple past: a past action
you had worked hard - past perfect: backshifted for a hypothetical situation
Plug that into the sentence, and you get:
If you had worked hard, you would not have had to suffer this much.
You only use would for hypothetical situations when you need the past of will.
I will meet you at the airport
I would meet you at the airport if I had a car.