Psychological changes absolutely affect physiology. Especially in the neuro-endocrine system. Your above example of cortisol release is a good one. Cortisol is often referred to as the "stress hormone" and has been found to reduce testosterone levels in certain cases. So using that logic, if someone were to be in a constant feared and stressed state, they would have higher concentrations of cortisol. Where as someone in a confident and comfortable state would have lower levels of cortisol and often times higher levels of testosterone.
Taking this one step further (albeit more into the realm of bro science), the increased testosterone from confidence will lead to increased manliness in both a physical, sexual and psychological sense which could lead to more confidence and therefore put you in a nice little positive feedback loop.
Visa-versa physiology will often have an effect on psychology and behaviour. ex: After prolonged binge drinking of alcohol people tend to be anxious, stressed etc and act differently. So it very well might be possible that Selfish people have high testosterone which makes them selfish but this seems more like correlation rather than causation.
Being confident in the gym isn't just a mind over matter experience. Often times the confidence will cause physiological changes in your body which allow you to lift the new PR. I've found that amping myself up before and gym session and knowing that I'm a fucking man will add weight to the bar, as meagre as it may be.