Rebuilding confidence after a relationship that diminished you is a gradual process that requires patience and self-compassion. Start by reconnecting with activities and interests that make you feel capable and joyful. Spend time with people who see and appreciate your worth. Consider therapy to process the relationship's impact and challenge any negative beliefs about yourself that developed. Practice self-care and set small, achievable goals to rebuild your sense of competence.
Remember that your ex's treatment of you says nothing about your actual worth.