Thank you for your query
Since this is a problem of recent onset it would help to know what happened just before it started. This history can be best elicited by a counselor or therapist. If you would like to try self help then maybe try taking a brief holiday, rest, eat plenty of fruits n veg, antioxidant supplements and practice keeping erection longer when masturbating. If you are no better in 4 weeks please see you doctor for some tests and further investigations.
You might want to read ' New male sexuality' by Bernie Zilbergeld. It will help you decide if you need to see a therapist.