How to get confidence in myself after making several errors? I am a PhD student in mathematics. I was always brilliant in my studies. Now, I have a problem consisting in doing wrong things without paying attention. 

For example, I was asked to do some computations, and I did and checked but after sending an e-mail to my supervisor, I discovered that it missed other details. 

Also, I submitted a paper to two journals and it was rejected, but one of them I selected without asking my supervisor and after hearing this he was so angry. I know, he is right but I tried to be responsible for my work and
each time I tried to work better and give a good result.

I commit many errors in small details and that is why I lost confidence in myself. My supervisor is always blaming me, but he doesn't know that I did all my best. I don't know how to solve this problem and to make me confident in myself? Maybe my problem is essentially the way that I should learn to complete my thesis successfully.
I see three different issues in what you have described:


You make some mistakes in computations.  That happens to all of us, but whether you should be concerned about it depends on what type of mistakes you are making.  You need to look at what mistakes you are making and how, and see whether they are "sloppy" mistakes (in which case you can develop a checklist for yourself to avoid making them) or whether they are just coming form the fact that research is hard.
You submitted to a paper without consulting with your advisor (and maybe dual-submitted as well).  This is a serious problem, especially if you did a simultaneous submission to two journals, which is almost always forbidden and unethical.  If your advisor is a co-author, then you are definitely in the wrong to submit without approval: you are not taking responsibility for yourself, you are denying responsibility to your co-author.  Even if you did not commit either ethical sin, most advisors want to help advise their students, and submitting without consulting is a good way to make mistakes that will reflect badly on both yourself and your advisor.
Your advisor has been angry at you, and you are losing self-confidence.  Maybe you need to lose some of the undergraduate-style self-confidence, and to develop a more mature self-confidence.  What you describe as "being responsible" and "working your hardest" does not actually sound like responsibility to me: it sounds like you are not yet reflecting on how to manage your own behavior and its impact on others.  


For all of this, I think self-reflection and learning from your mistakes is the solution.  If you can understand how you have been making mistakes, then you can act to make them less likely in the future, and all three of these issues are likely to improve.