It depends upon the cause as to how long ED will last. Assuming it isn't a physical problem it could be end very soon.
Start with a thorough physical exam. Make sure you are healthy just to rule that out.
Stress, being over worked, or being tired can all contribute to ED. Anxiety, from losing your erection in the past can also contribute.
All guys occasionally lose their erection. Don't focus on it as it can become self-fulfilling that you will have problems.
Hope it helps.
Regarding your question, ED should be thoroughly diagnosed before you can say that you have Erectile Dysfunction. It should be diagnosed by a doctor. There are series of tests to be done to be able to rule out that you really have erectile dysfunction. medic-an has a point there that it might be that you are just stressed with your work. Better yet, consult a specialist doctor in your place because they are the ones that can help you with your problem.
Yes It can cure itself if you give it a bit time. However I have been using Pro-Agra 100mg which is not as expensive as Viagra or strong. It worked for me. Whatsoever my advice to you is you should see your wife more and try to work things out together. Being open to her about the problem and if she is willing to help you can try things out. At the end of the day stress or depression in your mind plays a big roll