If you don’t have people in your life who provide the kinds of external supports that help build resilience, be proactive in searching out mentors who care about you and believe in your potential, for example some high schools and colleges have mentoring programs.
Thinking “I would like to do well in my assignments, and I will try my hardest” is healthy and appropriate because it is flexible – it doesn’t demand that it must be perfect. This talk doesn’t create stress because the thoughts are preferences rather than “shoulds” or rigid rules.
Things won’t always work out the way that you would like. Whilst some of our thoughts of how things “should” be are helpful, when you hold onto these beliefs in an absolute, inflexible way, it raises your chances of feeling bad about yourself and can damage your self-esteem.
Having people in your life who care about you, help you through tough times and believe in your abilities and strengths, and being part of a community that provides opportunities for meaningful participation (decision making/contributing your talents), will help you become more resilient.