How to have a positive mental attitude?
In order to maintain a positive mental attitude, one needs to have self-awareness. Whether it is about your own strengths and weaknesses, or about how you react in certain situations. This awareness will help you identify the things that might be causing you unhappiness and make changes accordingly.
It is also important to find what brings out the best in yourself and try to do more of those things. For instance, if you love cooking, try cooking more often. If you love reading books, read more books.
Lastly, it is important not to compare yourself with others too much because this might lead to feelings of inadequacy which can make your mental health worse.