Marriage is the solution for many things, but it is not the solution to psychological problems. If you come to a relationship with psychological problems, there is a significant probability that they will only get worse.
If you are suffering from depression, acute anxiety, an addiction, or such like, give your full attention to addressing that issue before you further complicate your life through trying to form a relationship.
Once you have got on top of your issue, you will be in a much better position to hold it altogether during dating. If you are not in the right state of mind to date, no amount of covering it up is going to work.