Here's 3 ways to do that:
1- Focus on all the reasons YOU CAN be successful. Count them, order them, ponder them. Whatever you have to do... you have more assets in your court than you probably realize. Whether it's people, education, resources, tools, creativity, personal strengths, lots of free time or whatever it is... Rather than focusing on the reasons you CAN'T be successful, focus on those reasons you CAN be successful for getting the job done.
2- Think positively (happy, fun, successful) while you're working. Think about the job being finished, on the great outcome, on getting it done in a timely manner. Stay positive in your thoughts... even if you get sidetracked, run into hurdles or encounter difficulties. Positive attitudes yield positive outcomes.
3- Be positive after the job is done. Focus on all the good in people, results, etc. This will get you set up for the next task you're about to master.
Positivity is paramount.