How do I regain my confidence in talking to women and flirting with them and asking them on dates etc?

I used to think that I was a good looking dude not bad anyway had some pretty good confidence and thought I was kind of funny but My past previous couple relationships I was devalued and shown that I was basically nothing in the relationship I guess by the end of it nothing I did seem to matter or have any value for anything good was just not appreciated no respect towards my way I was always to blame I could do nothing good enough how do you recover from that when you view yourself as nothing now

How do I regain my confidence in talking to women and flirting with them and asking them on dates etc?
Post Opinion