'to work' hard is better than 'to wish', but 'to wish' is far more better than 'to despair'. Still never wish the past changed, it has gone forever. What is done is done and it will never be undone.
Wish about the present
"I am poor".
"I am not rich".
In this case expressing a wish is for something to be different from what it actually is.
I wish I were not poor.
I wish I were rich.
"I live here". => I wish I did not live here.
"I do not have money". => I wish I had money.
Form
wish / if only + subject + verb in the past simple (subjunctive) [V2]
Wish about the past
"I was lazy".
"I was not hardworking".
Expressing a wish about the past means you regret something about the past and you wish the situation might have been different.
I wish I had not been lazy.
I wish I had been hardworking.
"I made mistakes". => I wish I had not made mistakes.
"I did not do my homework". => I wish I had done my homework.
Form
wish / if only + subject + verb in the past perfect [had+V3]
What do these sentences mean?
If only I slept well. (this means that in reality I don't sleep well)
I wish I had revised my lessons. (but in reality I didn't revise my lessons)
If only she were younger. (unfortunately she is not young)
We wished they hadn't postponed the meeting. (but they did)
If he had succeeded, his mother wouldn't have punished him (but actually his mother did punish him because he didn't succeed.)
How to express a wish?
There are two things you have to bear in mind
When the original sentence (reality) is affirmative, you must change it to the negative form and vice-versa.
When the original sentence is in the present go back to the past and if it is in the past go to past perfect (always one step back)
Modal verbs
can
==>
could
will
==>
would
may
==>
might
must
==>
had to
N.B. Never use "will" after "I wish" or "If only".
Examples
Have a look at these five sentences and try to re-write them as indicated.