I would suggest training five days a week and doing fewer calories.
A simple rule of thumb for building muscle is that under good-ideal conditions a man can build 1-2 lbs (.45-.90kg) of muscle per month, while a woman can do half of that. If you are gaining more weight than that, it will be fat. To monitor this more closely, divide that number by four and check your weight gain each week. Thus, your goal weight gain (if you are a man) should not exceed 0.5 lbs (.22kg) a week.
- Your total caloric goal should be something that adds 0.0-0.5 lbs of total body weight to you each week. Reduce or increase your caloric total to reach this goal. MyFitnessPal is a great app that can help you track your calorie totals.
- You'll also want to ensure that you get enough protein in your diet to feed those muscles you're trying to build. Estimates vary, but getting anywhere from 1.5-2.0x your kg body weight in grams of protein is plenty.
As for your training regimen three days of strength training is fine, but if it were me, I would toss some HIIT cardio in twice a week as well. Will cardio kill your gains? No, but your diet might. Why toss in two days of cardio? It's good for fat loss, endurance, and heart health for starters, but it will also help to balance out all that strength training as well as give you something to do between strength days. As a side note, you can do some quick (5-10 minutes) abwork every day if you want to build abs, they recovery quickly. They don't necessarily need to be done exclusively on strength training days.
Finally, if lack of energy at the gym is/has been a problem for you, you will want to determine the cause. Are you getting enough sleep/rest in general? Rest and recovery is vital to building muscles. Are you spending too much time in the gym? Overtraining is a real thing, but as a rule of thumb, try to spend less than an hour in the gym when you're there (it's entirely possible to get a great workout done in under half an hour). Is your diet not giving you the energy you need? It might just be that you're not used to it, but it may be that you're under eating or simply not eating the nutrients that you need. If you seem to be good in all of these areas, but you still don't have enough energy, that is what preworkout supplements are made for. Try using those for better results.